From: vsr Date: Thu, 24 Feb 2011 12:48:47 +0000 (+0000) Subject: Fix regression in Python modules: second activation of Python module does not activat... X-Git-Tag: V6_3_0a1~51 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=525f726ed5116848bcb237e38ed14c5dd5c2eff3;p=modules%2Fgui.git Fix regression in Python modules: second activation of Python module does not activate menus and Python module is not called. --- 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 a702c2f2a..9c507481e 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx +++ b/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx @@ -148,6 +148,14 @@ QString SALOME_PYQT_Module::engineIOR() const */ bool SALOME_PYQT_Module::activateModule( SUIT_Study* theStudy ) { + // call base implementation + bool res = SalomeApp_Module::activateModule( theStudy ); + + if ( !res ) + return res; + + // internal activation + return activateModuleInternal( theStudy ); } /*! diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.cxx b/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.cxx index 675ac783b..0f9746cfa 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.cxx +++ b/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.cxx @@ -384,6 +384,21 @@ bool SALOME_PYQT_ModuleLight::activateModule( SUIT_Study* theStudy ) if ( !res ) return res; + // internal activation + return activateModuleInternal( theStudy ); +} + +/*! + \brief Perform internal activation of the module. + + The only goal of this function is to extract common functionality + for LightApp_Module and SalomeApp_module classes requried by the + specific architecture aspects of "light" / "full" SALOME modes. + + \sa activateModule() +*/ +bool SALOME_PYQT_ModuleLight::activateModuleInternal( SUIT_Study* theStudy ) +{ // reset the activation status to the default value myLastActivateStatus = true; diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.h b/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.h index 1fa012262..fded1b871 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.h +++ b/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.h @@ -165,6 +165,7 @@ public slots: protected: /* create data model */ virtual CAM_DataModel* createDataModel(); + virtual bool activateModuleInternal( SUIT_Study* ); private: void init( CAM_Application* );