From 9e4e4bd9f2c0a86c21f24d6c80f5dc2c3eb6e97c Mon Sep 17 00:00:00 2001 From: akl Date: Tue, 10 Dec 2013 11:24:50 +0000 Subject: [PATCH] Fix of INTPAL0052217: TC7.3.0:SIGSEGV when update study in NoteBook --- src/LightApp/LightApp_Application.cxx | 9 +++++++++ src/LightApp/LightApp_Application.h | 1 + 2 files changed, 10 insertions(+) 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(); -- 2.39.2