Salome HOME
return value of activateModule() and deactivateModule() corrected T3_0_0_a2
authorsmh <smh@opencascade.com>
Thu, 9 Jun 2005 05:50:05 +0000 (05:50 +0000)
committersmh <smh@opencascade.com>
Thu, 9 Jun 2005 05:50:05 +0000 (05:50 +0000)
src/SUPERVGUI/SUPERVGUI.cxx
src/SUPERVGUI/SUPERVGUI.h

index 934dde1ba06230a6ae507497cec2005e9e769ea4..3d4f78f45954e7a1d404d1b7912b1c91ff05f650 100644 (file)
@@ -192,9 +192,15 @@ void SUPERVGUI::initialize( CAM_Application* app )
 
 }
 
- void SUPERVGUI::activateModule( SUIT_Study* theStudy )
+bool SUPERVGUI::activateModule( SUIT_Study* theStudy )
 {
-  SalomeApp_Module::activateModule( theStudy );
+  if ( CORBA::is_nil( engine ) )
+    return false;
+
+  if ( !SalomeApp_Module::activateModule( theStudy ) )
+    return false;
+
+
 
   //---------------------------------------
   setMenuShown( true );
@@ -205,6 +211,7 @@ void SUPERVGUI::initialize( CAM_Application* app )
   connect( application()->desktop(), SIGNAL( windowActivated( SUIT_ViewWindow* ) ), 
           this, SLOT( setMain( SUIT_ViewWindow* ) ) );
 
+  return true;
 }
 
 QString SUPERVGUI::engineIOR() const 
@@ -214,7 +221,7 @@ QString SUPERVGUI::engineIOR() const
   return QString( "" );
 }
 
-void SUPERVGUI::deactivateModule( SUIT_Study* theStudy )
+bool SUPERVGUI::deactivateModule( SUIT_Study* theStudy )
 {
   setMenuShown( false );
   setToolShown( false );
@@ -223,7 +230,7 @@ void SUPERVGUI::deactivateModule( SUIT_Study* theStudy )
              this, SLOT( setMain( SUIT_ViewWindow* ) ) );
   //---------------------------------------
 
-  SalomeApp_Module::deactivateModule( theStudy );
+  return SalomeApp_Module::deactivateModule( theStudy );
 }
 
 CAM_DataModel* SUPERVGUI::createDataModel()
index d35d4ac1b1af337533619679416c9106362e83bf..e484bcde42309b93a4ddc1a18097e27c07619c0a 100644 (file)
@@ -120,8 +120,8 @@ class SUPERVGUI: public SalomeApp_Module {
     void OnGUIEvent();
 
   public slots:
-    virtual void           activateModule( SUIT_Study* );
-    virtual void           deactivateModule( SUIT_Study* );
+    virtual bool           activateModule( SUIT_Study* );
+    virtual bool           deactivateModule( SUIT_Study* );
       
   protected:
     virtual CAM_DataModel* createDataModel();