From 955c9c5f63f5732867c1898e4ab435d1099bab58 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Tue, 28 Feb 2012 11:54:00 +0000
Subject: [PATCH]

---
 Fltk/onelabWindow.cpp | 3 ++-
 Fltk/onelabWindow.h   | 1 +
 Mesh/meshGFace.cpp    | 6 +++---
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Fltk/onelabWindow.cpp b/Fltk/onelabWindow.cpp
index d02494c7a0..f607df36f4 100644
--- a/Fltk/onelabWindow.cpp
+++ b/Fltk/onelabWindow.cpp
@@ -1256,7 +1256,8 @@ void solver_cb(Fl_Widget *w, void *data)
   else
     FlGui::instance()->onelab->rebuildSolverList();
 
-  onelab_cb(0, (void*)"check");
+  if(FlGui::instance()->onelab->getButtonMode() == "Compute")
+    onelab_cb(0, (void*)"check");
 }
 
 #else
diff --git a/Fltk/onelabWindow.h b/Fltk/onelabWindow.h
index 2c6bbadb2c..52f7188ce7 100644
--- a/Fltk/onelabWindow.h
+++ b/Fltk/onelabWindow.h
@@ -39,6 +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(); }
   void show(){ _win->show(); }
   int shown(){ return _win->shown(); }
   int meshAuto(){ return _gear->menu()[2].value(); }
diff --git a/Mesh/meshGFace.cpp b/Mesh/meshGFace.cpp
index 6b7d64a66d..22f503a820 100644
--- a/Mesh/meshGFace.cpp
+++ b/Mesh/meshGFace.cpp
@@ -1103,7 +1103,7 @@ bool meshGenerator(GFace *gf, int RECUR_ITER,
 
   // BOUNDARY LAYER
   if (!onlyInitialMesh) {
-    if (gf->getMeshingAlgo() == ALGO_2D_FRONTAL_QUAD) buildBackGroundMesh (gf);    
+    if (gf->getMeshingAlgo() == ALGO_2D_FRONTAL_QUAD) buildBackGroundMesh (gf);
     modifyInitialMeshForTakingIntoAccountBoundaryLayers(gf);
   }
 
@@ -1749,11 +1749,11 @@ void deMeshGFace::operator() (GFace *gf)
 }
 
 // for debugging, change value from -1 to -100;
-int debugSurface = -100; //-1;
+int debugSurface = -1; //-1;
 
 void meshGFace::operator() (GFace *gf)
 {
-  
+
   gf->model()->setCurrentMeshEntity(gf);
 
   if(debugSurface >= 0 && gf->tag() != debugSurface){
-- 
GitLab