Skip to content
Snippets Groups Projects
Commit 4e3c0391 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

tweaks

parent 379811cd
No related branches found
No related tags found
No related merge requests found
...@@ -547,6 +547,7 @@ int MergePostProcessingFile(const std::string &fileName, bool showLastStep, ...@@ -547,6 +547,7 @@ int MergePostProcessingFile(const std::string &fileName, bool showLastStep,
void ClearProject() void ClearProject()
{ {
Msg::Info("Clearing all models and views...");
#if defined(HAVE_POST) #if defined(HAVE_POST)
for(int i = PView::list.size() - 1; i >= 0; i--) for(int i = PView::list.size() - 1; i >= 0; i--)
delete PView::list[i]; delete PView::list[i];
...@@ -563,6 +564,7 @@ void ClearProject() ...@@ -563,6 +564,7 @@ void ClearProject()
fclose(openedFiles[i]); fclose(openedFiles[i]);
openedFiles.clear(); openedFiles.clear();
} }
Msg::Info("Done clearing all models and views");
new GModel(); new GModel();
GModel::current()->setFileName(CTX::instance()->defaultFileName); GModel::current()->setFileName(CTX::instance()->defaultFileName);
......
...@@ -74,11 +74,11 @@ class onelabGmshServer : public GmshServer{ ...@@ -74,11 +74,11 @@ class onelabGmshServer : public GmshServer{
// if asked, refresh the onelab GUI // if asked, refresh the onelab GUI
std::vector<onelab::string> ps; std::vector<onelab::string> ps;
onelab::server::instance()->get(ps, "Gmsh/Action"); onelab::server::instance()->get(ps, "Gmsh/Action");
if(FlGui::available() && ps.size() && ps[0].getValue() == "refresh"){ if(ps.size() && ps[0].getValue() == "refresh"){
ps[0].setVisible(false); ps[0].setVisible(false);
ps[0].setValue(""); ps[0].setValue("");
onelab::server::instance()->set(ps[0]); onelab::server::instance()->set(ps[0]);
onelab_cb(0, (void*)"refresh"); if(FlGui::available()) onelab_cb(0, (void*)"refresh");
} }
// wait at most waitint seconds and respond to FLTK events // wait at most waitint seconds and respond to FLTK events
if(FlGui::available()) FlGui::instance()->wait(waitint); if(FlGui::available()) FlGui::instance()->wait(waitint);
...@@ -1588,7 +1588,7 @@ void solver_batch_cb(Fl_Widget *w, void *data) ...@@ -1588,7 +1588,7 @@ void solver_batch_cb(Fl_Widget *w, void *data)
onelab::string o(c->getName() + "/Action"); onelab::string o(c->getName() + "/Action");
// initialize // initialize
onelabUtils::runGmshClient("initalize", CTX::instance()->solver.autoMesh); onelabUtils::runGmshClient("initialize", CTX::instance()->solver.autoMesh);
o.setValue("initialize"); o.setValue("initialize");
onelab::server::instance()->set(o); onelab::server::instance()->set(o);
c->run(); c->run();
...@@ -1601,6 +1601,7 @@ void solver_batch_cb(Fl_Widget *w, void *data) ...@@ -1601,6 +1601,7 @@ void solver_batch_cb(Fl_Widget *w, void *data)
// check // check
onelabUtils::runGmshClient("check", CTX::instance()->solver.autoMesh); onelabUtils::runGmshClient("check", CTX::instance()->solver.autoMesh);
onelabUtils::guessModelName(c);
o.setValue("check"); o.setValue("check");
onelab::server::instance()->set(o); onelab::server::instance()->set(o);
c->run(); c->run();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment