From: smh Date: Thu, 9 Jun 2005 05:50:05 +0000 (+0000) Subject: return value of activateModule() and deactivateModule() corrected X-Git-Tag: T3_0_0_a2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=18cd6395ebc93ec0e3cd383d9e0e4117fa82b474;p=modules%2Fsuperv.git return value of activateModule() and deactivateModule() corrected --- diff --git a/src/SUPERVGUI/SUPERVGUI.cxx b/src/SUPERVGUI/SUPERVGUI.cxx index 934dde1..3d4f78f 100644 --- a/src/SUPERVGUI/SUPERVGUI.cxx +++ b/src/SUPERVGUI/SUPERVGUI.cxx @@ -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() diff --git a/src/SUPERVGUI/SUPERVGUI.h b/src/SUPERVGUI/SUPERVGUI.h index d35d4ac..e484bcd 100644 --- a/src/SUPERVGUI/SUPERVGUI.h +++ b/src/SUPERVGUI/SUPERVGUI.h @@ -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();