diff --git a/Fltk/onelabWindow.cpp b/Fltk/onelabWindow.cpp index 6a0ad4b8b071ed4392e3dc1570671de9a0f124dd..6472a8b357f6f159cc918aca36ab310ef1bf7ea7 100644 --- a/Fltk/onelabWindow.cpp +++ b/Fltk/onelabWindow.cpp @@ -801,10 +801,13 @@ void onelab_cb(Fl_Widget *w, void *data) do{ // enter loop - // the Gmsh client is special: it always gets executed first. (A - // special-puropose meta-model allows more flexibility: but in the simple - // GUI we can assume this) - runGmshClient(action); + //check whether the client is a onelab Metamodel + std::vector<onelab::number> n; + onelab::server::instance()->get(n,"HasGmsh"); + bool metamodel = (n.size() && n[0].getValue()); + + // If the client is a NOT a metamodel Gmsh gets executed + if(!metamodel) runGmshClient(action); if(action == "compute") FlGui::instance()->onelab->checkForErrors("Gmsh"); @@ -828,6 +831,10 @@ void onelab_cb(Fl_Widget *w, void *data) if(FlGui::instance()->onelab->stop()) break; } + // update geometry in Gmsh window which might have been by the metamodel + //if(metamodel) + runGmshClient("check"); + if(action != "initialize"){ updateOnelabGraphs(); FlGui::instance()->onelab->rebuildTree();