Salome HOME
Not required windows showed during dock windows state restoring.
[modules/gui.git] / src / SALOME_SWIG / SALOMEGUI_Swig.cxx
index 7c79a6b0bac49b4fb64b2a64266d056169ef4077..c4c2382c4b875f68734fd31042f3cc9758297edc 100644 (file)
@@ -36,7 +36,7 @@
 #include "SalomeApp_Study.h"
 #include "SalomeApp_Module.h"
 #include "SalomeApp_DataObject.h"
-#include "SalomeApp_SelectionMgr.h"
+#include "LightApp_SelectionMgr.h"
 #include "SALOME_Prs.h"
 #include "SOCC_ViewModel.h"
 #include "SVTK_ViewModel.h"
@@ -138,6 +138,7 @@ void SALOMEGUI_Swig::updateObjBrowser( bool /*updateSelection*/ )
     virtual void Execute() {
       if ( SalomeApp_Application* anApp = getApplication() ) {
        anApp->updateObjectBrowser();
+       anApp->updateActions(); //SRN: added in order to update the toolbar
       }
     }
   };
@@ -240,8 +241,8 @@ public:
   TSelectedCountEvent() : myResult( 0 ) {}
   virtual void Execute() {
     if ( SalomeApp_Application* anApp = getApplication() ) {
-      SalomeApp_Study*        aStudy  = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() ); // for sure!
-      SalomeApp_SelectionMgr* aSelMgr = anApp->selectionMgr(); 
+      SalomeApp_Study*       aStudy  = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() ); // for sure!
+      LightApp_SelectionMgr* aSelMgr = anApp->selectionMgr(); 
       if ( aStudy && aSelMgr ) {
        SALOME_ListIO anIOList;
        aSelMgr->selectedObjects( anIOList );
@@ -267,8 +268,8 @@ public:
   TGetSelectedEvent( int theIndex ) : myIndex( theIndex ) {}
   virtual void Execute() {
     if ( SalomeApp_Application* anApp = getApplication() ) {
-      SalomeApp_Study*        aStudy  = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() ); // for sure!
-      SalomeApp_SelectionMgr* aSelMgr = anApp->selectionMgr(); 
+      SalomeApp_Study*       aStudy  = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() ); // for sure!
+      LightApp_SelectionMgr* aSelMgr = anApp->selectionMgr(); 
       if ( aStudy && aSelMgr ) {
        SALOME_ListIO anIOList;
        aSelMgr->selectedObjects( anIOList );
@@ -304,8 +305,8 @@ void SALOMEGUI_Swig::AddIObject( const char* theEntry )
     TEvent( const char* theEntry ) : myEntry( theEntry ) {}
     virtual void Execute() {
       if ( SalomeApp_Application* anApp = getApplication() ) {
-       SalomeApp_Study*        aStudy  = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() ); // for sure!
-       SalomeApp_SelectionMgr* aSelMgr = anApp->selectionMgr(); 
+       SalomeApp_Study*       aStudy  = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() ); // for sure!
+       LightApp_SelectionMgr* aSelMgr = anApp->selectionMgr(); 
        if ( aStudy && aSelMgr ) {
          SALOME_ListIO anIOList;
          anIOList.Append( new SALOME_InteractiveObject( myEntry, "", "" ) );
@@ -328,11 +329,11 @@ void SALOMEGUI_Swig::RemoveIObject( const char* theEntry )
     TEvent( const char* theEntry ) : myEntry( theEntry ) {}
     virtual void Execute() {
       if ( SalomeApp_Application* anApp = getApplication() ) {
-       SalomeApp_Study*        aStudy  = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() ); // for sure!
-       SalomeApp_SelectionMgr* aSelMgr = anApp->selectionMgr(); 
+       SalomeApp_Study*       aStudy  = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() ); // for sure!
+       LightApp_SelectionMgr* aSelMgr = anApp->selectionMgr(); 
        if ( aStudy && aSelMgr ) {
          SALOME_ListIO anIOList;
-         // VSR: temporary solution, until SalomeApp_SelectionMgr::unsetSelectedObjects() method appears
+         // VSR: temporary solution, until LightApp_SelectionMgr::unsetSelectedObjects() method appears
          // Lately this should be replaced by the following:
          // anIOList.Append( new SALOME_InteractiveObject( myEntry, "", "" ) );
          // aSelMgr->unsetSelectedObjects( anIOList );
@@ -363,8 +364,8 @@ void SALOMEGUI_Swig::ClearIObjects()
     TEvent() {}
     virtual void Execute() {
       if ( SalomeApp_Application* anApp = getApplication() ) {
-       SalomeApp_Study*        aStudy  = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() ); // for sure!
-       SalomeApp_SelectionMgr* aSelMgr = anApp->selectionMgr(); 
+       SalomeApp_Study*       aStudy  = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() ); // for sure!
+       LightApp_SelectionMgr* aSelMgr = anApp->selectionMgr(); 
        if ( aStudy && aSelMgr )
          aSelMgr->clearSelected();
       }