]> SALOME platform Git repositories - modules/hexablock.git/commitdiff
Salome HOME
bos #20455 [CEA20480] HEXABLOCK - Crash after New Study
authorvsr <vsr@opencascade.com>
Wed, 3 Feb 2021 08:52:56 +0000 (11:52 +0300)
committervsr <vsr@opencascade.com>
Wed, 3 Feb 2021 08:52:56 +0000 (11:52 +0300)
src/HEXABLOCKGUI/HEXABLOCKGUI.cxx
src/HEXABLOCKGUI/HEXABLOCKGUI.hxx

index b01745be9aee04ace635f09c9c9c67becb8cd308..42e4fcd1fe7dd7bcaddf9c352895e7b75c52a19c 100644 (file)
@@ -142,7 +142,7 @@ HEXABLOCKGUI::HEXABLOCKGUI() :
           _dwAssociation(0),
           _dwGroups(0),
           _dwMesh(0),
-          _dwObjectBrowser(0),
+//          _dwObjectBrowser(0),
           _dwInputPanel(0),
           _patternDataTreeView(0),
 //          _patternBuilderTreeView(0),
@@ -408,6 +408,16 @@ bool HEXABLOCKGUI::deactivateModule( SUIT_Study* theStudy )
 
     hideActor();
 
+    if(currentOccGView) {
+      delete currentOccGView;
+      currentOccGView = NULL;
+    }
+
+    if(currentDocGView) {
+      delete currentDocGView;
+      currentDocGView = NULL;
+    }
+
     return bOk;
 }
 
index f3cfd72ce3a345409ff308bcb431bf9888cf2b75..15c65552644629c791fed39e8c1acd6646cd412c 100644 (file)
@@ -26,6 +26,7 @@
 #include <map>
 #include <set>
 
+#include <QPointer>
 #include <QTreeView>
 #include <QModelIndex>
 #include <QDockWidget>
@@ -342,7 +343,7 @@ private:
   QDockWidget *_dwAssociation;   // Hexablock association edition
   QDockWidget *_dwGroups;        // Hexablock groups edition
   QDockWidget *_dwMesh;          // Hexablock meshing edtion
-  QDockWidget *_dwObjectBrowser; // Salome study
+  QPointer<QDockWidget> _dwObjectBrowser; // Salome study
   QDockWidget *_dwInputPanel;    // user Input