From bed94660c8f15b7afb08d06531de0f259e4698f4 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Thu, 28 Feb 2013 03:29:27 +0000
Subject: [PATCH] "0" now also resets the onelab database (for ruth ;-)

---
 Fltk/graphicWindow.cpp | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/Fltk/graphicWindow.cpp b/Fltk/graphicWindow.cpp
index bcbb8e695b..f628e9e11c 100644
--- a/Fltk/graphicWindow.cpp
+++ b/Fltk/graphicWindow.cpp
@@ -549,13 +549,10 @@ void geometry_reload_cb(Fl_Widget *w, void *data)
 {
   std::string fileName = GModel::current()->getFileName();
   ClearProject();
-  OpenProject(fileName);
 
-  // TODO: we should probably reset the onelab DB here, too: calling
-  // onelab_cb(reset) seems to work, but we perform OpenProject *twice* (reset,
-  // then check) -- we should fix this before enabling the onelab reset
-  //
-  // onelab_cb(0, (void*)"reset");
+  GModel::current()->setFileName(fileName);
+  //OpenProject(fileName);
+  onelab_cb(0, (void*)"reset"); // this will call OpenProject
 
   drawContext::global()->draw();
 }
-- 
GitLab