From cdb040586d195ad52885738ea890606a4fc312be Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 19 Nov 2014 16:56:50 +0300 Subject: [PATCH] Invoke closeStudy() method of Python GUI module, when study is closed. --- .../SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx | 12 ++++++++++++ src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.h | 1 + 2 files changed, 13 insertions(+) diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx b/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx index 4b73279a7..d19f2ab5e 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx +++ b/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx @@ -246,6 +246,18 @@ void SALOME_PYQT_Module::preferencesChanged( const QString& section, const QStri myHelper->preferencesChanged( section, parameter ); } +/*! + \brief Called when study is closed + \param study study being closed + \sa PyModuleHelper::studyClosed() +*/ +void SALOME_PYQT_Module::studyClosed( SUIT_Study* study ) +{ + // call helper + myHelper->modelClosed( study ); + SalomeApp_Module::studyClosed( study ); +} + /*! \brief Test if object \a what can be dragged by the user. \param what data object being tested diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.h b/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.h index dbe410ca8..3e483dfec 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.h +++ b/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.h @@ -53,6 +53,7 @@ public: void contextMenuPopup( const QString&, QMenu*, QString& ); void createPreferences(); void preferencesChanged( const QString&, const QString& ); + void studyClosed( SUIT_Study* ); // drag-n-drop support bool isDraggable( const SUIT_DataObject* ) const; -- 2.39.2