Salome HOME
fix clear data when new study from button new: do not delete document when switching...
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_Module.cxx
index dc41e3e12e3c1ca7921d68d7b585000379b19538..5ef49f3d3d410a0c28c429ee076dc6fa15211103 100755 (executable)
 #include <QStatusBar>
 #include <QCursor>
 
-//#define _DEVDEBUG_
+#define _DEVDEBUG_
 #include "HYDRO_trace.hxx"
 
 static int ViewManagerId = 0;
@@ -332,14 +332,15 @@ bool HYDROGUI_Module::deactivateModule( SUIT_Study* theStudy )
   myViewManagerMap.clear();
 
   bool ret = LightApp_Module::deactivateModule( theStudy );
-  HYDROGUI_DataModel* aModel = getDataModel();
-  if (aModel->isAboutToClose())
-  {
+  return ret;
+}
+
+void HYDROGUI_Module::studyClosed(SUIT_Study* theStudy)
+{
+    DEBTRACE("HYDROGUI_Module::studyClosed");
     Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
     if (!aDoc.IsNull())
       aDoc->Close();
-  }
-  return ret;
 }
 
 void HYDROGUI_Module::windows( QMap<int, int>& theMap ) const