From 25a2de583420cf3a8c03332fe1c8954af2c2c0f2 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Sun, 30 Sep 2012 09:06:44 +0000
Subject: [PATCH] fix the fix

---
 Common/GmshMessage.cpp | 13 +++++++------
 Common/onelab.h        |  8 ++------
 Fltk/onelabWindow.cpp  |  4 ++--
 3 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/Common/GmshMessage.cpp b/Common/GmshMessage.cpp
index 87212ac025..c46cec201e 100644
--- a/Common/GmshMessage.cpp
+++ b/Common/GmshMessage.cpp
@@ -804,6 +804,7 @@ void Msg::ImportPhysicalsAsOnelabRegions()
             ((dim == 3) ? "Volume" : (dim == 2) ? "Surface" :
              (dim == 1) ? "Line" : "Point") + num.str();
         name.insert(0, "Gmsh/Physical groups/");
+        /*
 	std::vector<onelab::region> regions;
         std::set<std::string> val;
         val.insert(num.str());
@@ -816,12 +817,12 @@ void Msg::ImportPhysicalsAsOnelabRegions()
 	  regions[0].setAttribute("Closed", "1");
           _onelabClient->set(regions[0]);
         }
-
-        // onelab::region p(name, num.str());
-        // p.setDimension(dim);
-        // p.setReadOnly(true);
-        // p.setAttribute("Closed", "1");
-        // _onelabClient->set(p);
+        */
+        onelab::region p(name, num.str());
+        p.setDimension(dim);
+        p.setReadOnly(true);
+        p.setAttribute("Closed", "1");
+        _onelabClient->set(p);
       }
     }
   }
diff --git a/Common/onelab.h b/Common/onelab.h
index eb2c0e30b6..329f946a3a 100644
--- a/Common/onelab.h
+++ b/Common/onelab.h
@@ -397,7 +397,7 @@ namespace onelab{
       setAttributes(p.getAttributes());
       if(p.getValue() != getValue()){
         setValue(p.getValue());
-        setChanged(true);	
+        setChanged(true);
       }
       if(p.getKind() != getKind()){
         setKind(p.getKind());
@@ -441,15 +441,12 @@ namespace onelab{
     region(const std::string &name="",
            const std::set<std::string> &value = std::set<std::string>(),
            const std::string &label="", const std::string &help="")
-      : parameter(name, label, help), _value(value), _dimension(-1) {
-	setChanged(false); // FIXME
-    }
+      : parameter(name, label, help), _value(value), _dimension(-1) {}
     region(const std::string &name, const std::string &value,
            const std::string &label="", const std::string &help="")
       : parameter(name, label, help), _dimension(-1)
     {
       if(value.size()) _value.insert(value);
-      setChanged(false); // FIXME
     }
     void setValue(const std::set<std::string> &value){ _value = value; }
     void setDimension(int dim){ _dimension = dim; }
@@ -477,7 +474,6 @@ namespace onelab{
       }
       setDimension(p.getDimension());
       setChoices(p.getChoices());
-      setChanged(false); // FIXME
     }
     std::string toChar() const
     {
diff --git a/Fltk/onelabWindow.cpp b/Fltk/onelabWindow.cpp
index eb6e38468d..cabb26e05b 100644
--- a/Fltk/onelabWindow.cpp
+++ b/Fltk/onelabWindow.cpp
@@ -658,7 +658,7 @@ onelabWindow::onelabWindow(int deltaFontSize)
   _tree->connectorstyle(FL_TREE_CONNECTOR_SOLID);
   _tree->showroot(0);
 
-  _itemWidth = (int)(0.5 * _tree->w());
+  _itemWidth = (int)(0.4 * _tree->w());
 
   _butt[0] = new Fl_Button(width - 2*WB - 2*BB, height - WB - BH, BB, BH, "Check");
   _butt[0]->callback(onelab_cb, (void*)"check");
@@ -1021,7 +1021,7 @@ void onelabWindow::rebuildTree()
 {
   FL_NORMAL_SIZE -= _deltaFontSize;
 
-  _itemWidth = (int)(0.45 * _tree->w());
+  _itemWidth = (int)(0.4 * _tree->w());
 
   std::set<std::string> closed;
 
-- 
GitLab