From a6796434f8bf2fd4ed8845496b6fa58553ec50ff Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Fri, 19 Jul 2013 12:51:57 +0000
Subject: [PATCH] don't allow remving a solver when onelab is busy

---
 Fltk/solverButton.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Fltk/solverButton.cpp b/Fltk/solverButton.cpp
index 77e15a06ad..a09bfa1b29 100644
--- a/Fltk/solverButton.cpp
+++ b/Fltk/solverButton.cpp
@@ -3,6 +3,7 @@
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to the public mailing list <gmsh@geuz.org>.
 
+#include "GmshMessage.h"
 #include "FlGui.h"
 #include "Options.h"
 #include "onelabGroup.h"
@@ -10,6 +11,11 @@
 
 static void solver_remove_cb(Fl_Widget *w, void *data)
 {
+  if(FlGui::instance()->onelab->isBusy()){
+    Msg::Warning("Cannot remove client while solver is running");
+    return;
+  }
+
   int num = (intptr_t)data;
 
   std::string name = opt_solver_name(num, GMSH_GET, "");
-- 
GitLab