From a7b90434e6b9288366a4219ec4439508dcd8530b Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 3 Feb 2021 11:52:56 +0300 Subject: [PATCH] bos #20455 [CEA20480] HEXABLOCK - Crash after New Study --- src/HEXABLOCKGUI/HEXABLOCKGUI.cxx | 12 +++++++++++- src/HEXABLOCKGUI/HEXABLOCKGUI.hxx | 3 ++- 2 files changed, 13 insertions(+), 2 deletions(-) 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 -- 2.39.2