From: vsr Date: Wed, 3 Feb 2021 08:52:56 +0000 (+0300) Subject: bos #20455 [CEA20480] HEXABLOCK - Crash after New Study X-Git-Tag: V9_7_0a1~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a7b90434e6b9288366a4219ec4439508dcd8530b;p=modules%2Fhexablock.git bos #20455 [CEA20480] HEXABLOCK - Crash after New Study --- diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI.cxx b/src/HEXABLOCKGUI/HEXABLOCKGUI.cxx index b01745b..42e4fcd 100644 --- a/src/HEXABLOCKGUI/HEXABLOCKGUI.cxx +++ b/src/HEXABLOCKGUI/HEXABLOCKGUI.cxx @@ -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; } diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI.hxx b/src/HEXABLOCKGUI/HEXABLOCKGUI.hxx index f3cfd72..15c6555 100644 --- a/src/HEXABLOCKGUI/HEXABLOCKGUI.hxx +++ b/src/HEXABLOCKGUI/HEXABLOCKGUI.hxx @@ -26,6 +26,7 @@ #include #include +#include #include #include #include @@ -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 _dwObjectBrowser; // Salome study QDockWidget *_dwInputPanel; // user Input