From 70be813840c947c7b271224acf227156d23a83b2 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Tue, 28 Feb 2012 12:16:19 +0000 Subject: [PATCH] tweak --- Fltk/onelabWindow.cpp | 11 ++++++++++- Fltk/onelabWindow.h | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Fltk/onelabWindow.cpp b/Fltk/onelabWindow.cpp index f607df36f4..d06e623e7f 100644 --- a/Fltk/onelabWindow.cpp +++ b/Fltk/onelabWindow.cpp @@ -1143,6 +1143,13 @@ void onelabWindow::setButtonMode(const std::string &butt0, const std::string &bu } } +bool onelabWindow::isBusy() +{ + std::string s(_butt[1]->label()); + if(s == "Compute") return false; + return true; +} + void onelabWindow::rebuildSolverList() { // update OneLab window title and gear menu @@ -1256,7 +1263,9 @@ void solver_cb(Fl_Widget *w, void *data) else FlGui::instance()->onelab->rebuildSolverList(); - if(FlGui::instance()->onelab->getButtonMode() == "Compute") + if(FlGui::instance()->onelab->isBusy()) + FlGui::instance()->onelab->show(); + else onelab_cb(0, (void*)"check"); } diff --git a/Fltk/onelabWindow.h b/Fltk/onelabWindow.h index 52f7188ce7..4a740a2e8c 100644 --- a/Fltk/onelabWindow.h +++ b/Fltk/onelabWindow.h @@ -39,7 +39,7 @@ class onelabWindow{ void rebuildSolverList(); void rebuildTree(); void setButtonMode(const std::string &butt0, const std::string &butt1); - std::string getButtonMode(){ return _butt[1]->label(); } + bool isBusy(); void show(){ _win->show(); } int shown(){ return _win->shown(); } int meshAuto(){ return _gear->menu()[2].value(); } -- GitLab