From: akl Date: Tue, 10 Dec 2013 11:24:50 +0000 (+0000) Subject: Fix of INTPAL0052217: TC7.3.0:SIGSEGV when update study in NoteBook X-Git-Tag: V7_3_0~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9e4e4bd9f2c0a86c21f24d6c80f5dc2c3eb6e97c;p=modules%2Fgui.git Fix of INTPAL0052217: TC7.3.0:SIGSEGV when update study in NoteBook --- diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index f1f7c78d8..c7ec9f7db 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -1171,6 +1171,15 @@ void LightApp_Application::onSelectionChanged() action( EditPasteId )->setEnabled(canPaste); } +/*! Reset tree view model */ +void LightApp_Application::onCloseDoc( bool ask ) +{ + if ( SUIT_DataBrowser* ob = objectBrowser() ) + ob->setModel(0); + + CAM_Application::onCloseDoc( ask ); +} + /*! Adds window to application. \param wid - QWidget diff --git a/src/LightApp/LightApp_Application.h b/src/LightApp/LightApp_Application.h index 967676ef1..b1e82199c 100644 --- a/src/LightApp/LightApp_Application.h +++ b/src/LightApp/LightApp_Application.h @@ -191,6 +191,7 @@ public slots: virtual void onCopy(); virtual void onPaste(); virtual void onSelectionChanged(); + virtual void onCloseDoc( bool ask = true); protected: virtual void createActions();