]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix regression in Python modules: second activation of Python module does not activat...
authorvsr <vsr@opencascade.com>
Thu, 24 Feb 2011 12:48:47 +0000 (12:48 +0000)
committervsr <vsr@opencascade.com>
Thu, 24 Feb 2011 12:48:47 +0000 (12:48 +0000)
src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx
src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.cxx
src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.h

index a702c2f2a73026392ec40ed016facba65e398471..9c507481ea04d8a15d73bbeae60f5f428ed0a900 100644 (file)
@@ -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 );
 }
 
 /*!
index 675ac783b9a56cbd3d12656e99d96eebcee27bd0..0f9746cfa2c7d2e31e68c9be11ba5670372f95af 100644 (file)
@@ -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;
 
index 1fa012262cd67d37410db94702c241c5398d2f36..fded1b8712993e38186d64230bba5709c9864598 100644 (file)
@@ -165,6 +165,7 @@ public slots:
 protected:
   /* create data model */
   virtual CAM_DataModel*     createDataModel();
+  virtual bool               activateModuleInternal( SUIT_Study* );
 
 private:
   void                       init( CAM_Application* );