From 4451a4f48125a0752351f20509aa54cc98b55141 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Mon, 15 Feb 2016 09:25:21 +0000 Subject: [PATCH] behave as before for reload if there are no non-Gmsh clients --- Fltk/graphicWindow.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Fltk/graphicWindow.cpp b/Fltk/graphicWindow.cpp index b05f188d80..7ecadfc989 100644 --- a/Fltk/graphicWindow.cpp +++ b/Fltk/graphicWindow.cpp @@ -589,7 +589,19 @@ void onelab_reload_cb(Fl_Widget *w, void *data) void geometry_reload_cb(Fl_Widget *w, void *data) { - onelab_cb(0, (void*)"check"); // will call OpenProject + bool haveNonGmshClients = false; + for(onelab::server::citer it = onelab::server::instance()->firstClient(); + it != onelab::server::instance()->lastClient(); it++){ + onelab::client *c = *it; + if(c->getName() != "Gmsh"){ + haveNonGmshClients = true; + break; + } + } + if(haveNonGmshClients) + onelab_cb(0, (void*)"check"); // will call OpenProject + else + OpenProject(GModel::current()->getFileName()); drawContext::global()->draw(); } -- GitLab