From: msv Date: Wed, 13 Jul 2005 06:35:33 +0000 (+0000) Subject: debug IPAL9411: redefine virtual methods createEmptyStudy and activateModule X-Git-Tag: V3_0_1~58 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=765ec41de79da279a808efa0756582b52b3a89c2;p=modules%2Fgui.git debug IPAL9411: redefine virtual methods createEmptyStudy and activateModule in order to call updateTree of object browser. It is due to removing call of updateTree during treating the signal rootChanged of CAM_Study. --- diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index d5ff6ffff..18fde6a4a 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -1691,3 +1691,17 @@ void SalomeApp_Application::onDesktopActivated() if(aModule) aModule->studyActivated(); } + +void SalomeApp_Application::createEmptyStudy() +{ + CAM_Application::createEmptyStudy(); + if ( objectBrowser() ) + objectBrowser()->updateTree(); +} + +bool SalomeApp_Application::activateModule( CAM_Module* mod ) +{ + CAM_Application::activateModule( mod ); + if ( objectBrowser() ) + objectBrowser()->updateTree(); +} diff --git a/src/SalomeApp/SalomeApp_Application.h b/src/SalomeApp/SalomeApp_Application.h index 7ccc85442..94ed79b40 100644 --- a/src/SalomeApp/SalomeApp_Application.h +++ b/src/SalomeApp/SalomeApp_Application.h @@ -101,6 +101,8 @@ public: virtual void contextMenuPopup( const QString&, QPopupMenu*, QString& ); + virtual void createEmptyStudy(); + static CORBA::ORB_var orb(); static SALOMEDSClient_StudyManager* studyMgr(); static SALOME_NamingService* namingService(); @@ -143,6 +145,7 @@ protected: virtual void afterCloseDoc(); virtual void moduleAdded( CAM_Module* ); + virtual bool activateModule( CAM_Module* = 0 ); SalomeApp_Preferences* preferences( const bool ) const;