Salome HOME
Compiler error on gcc 3.4.1 corrected: cannot use SALOME_ListIO() where const SALOME_...
[modules/smesh.git] / src / SMESHGUI / SMESHGUI.cxx
index 30064c21b604b455f3b4f0b36dd91ae10cde908b..798a19a8739b43fe4a7a5ac02fb1f79cba05fc68 100644 (file)
@@ -395,7 +395,7 @@ namespace{
       }
       case 1133:{
        SMESHGUI::GetSMESHGUI()->EmitSignalDeactivateDialog();
-       new SMESHGUI_TransparencyDlg( SMESHGUI::desktop(), "", false );
+       new SMESHGUI_TransparencyDlg( SMESHGUI::GetSMESHGUI(), "", false );
        return;
       }}
       SALOME_ListIteratorOfListIO It( selected );
@@ -455,7 +455,7 @@ namespace{
              float Shrink = anActor->GetShrinkFactor();
 
              SMESHGUI_Preferences_ColorDlg *aDlg =
-               new SMESHGUI_Preferences_ColorDlg(SMESHGUI::desktop(),"");
+               new SMESHGUI_Preferences_ColorDlg( SMESHGUI::GetSMESHGUI(), "" );
              aDlg->SetColor(1, c);
              aDlg->SetColor(2, e);
              aDlg->SetColor(3, n);
@@ -511,7 +511,7 @@ namespace{
 
     SMESHGUI::GetSMESHGUI()->EmitSignalDeactivateDialog();
     SMESHGUI_Preferences_ColorDlg *aDlg =
-      new SMESHGUI_Preferences_ColorDlg(SMESHGUI::desktop(), "");
+      new SMESHGUI_Preferences_ColorDlg( SMESHGUI::GetSMESHGUI(), "" );
 
     QColor color = mgr->colorValue( "SMESH", "SettingsFillColor", QColor(0, 170, 255) );
     aDlg->SetColor(1, color);
@@ -793,8 +793,8 @@ namespace{
     aStudyBuilder->CommitCommand();
 
     /* Clear any previous selection */
-    SALOME_ListIO selected1;
-    aSel->setSelectedObjects( selected1 );
+    SALOME_ListIO l1;
+    aSel->setSelectedObjects( l1 );
 
     SMESHGUI::GetSMESHGUI()->updateObjBrowser();
   }
@@ -1149,12 +1149,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     }
   case 201:
     {
-      SalomeApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
-      SALOME_ListIO selected;
-      if( aSel )
-        aSel->selectedObjects( selected );
-
-      SMESHGUI_Preferences_ScalarBarDlg::ScalarBarProperties( desktop(), aSel );
+      SMESHGUI_Preferences_ScalarBarDlg::ScalarBarProperties( this );
       break;
     }
 
@@ -1210,8 +1205,8 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
          }
        }
       }
-      SALOME_ListIO selected1;
-      aSel->setSelectedObjects( selected1 );
+      SALOME_ListIO l1;
+      aSel->setSelectedObjects( l1 );
       break;
     }
 
@@ -1674,7 +1669,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       else if ( theCommandID == 811 ) aMode = SMESHGUI_GroupOpDlg::INTERSECT;
       else                            aMode = SMESHGUI_GroupOpDlg::CUT;
 
-      ( new SMESHGUI_GroupOpDlg( desktop(), SMESHGUI::selectionMgr(), aMode ) )->show();
+      ( new SMESHGUI_GroupOpDlg( this, aMode ) )->show();
       break;
     }
 
@@ -1685,7 +1680,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
 
       EmitSignalDeactivateDialog();
 
-      new SMESHGUI_DeleteGroupDlg(this);
+      new SMESHGUI_DeleteGroupDlg( this );
       break;
     }
 
@@ -1728,13 +1723,13 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
          IOs.Clear();
          IOs.Append( It.Value() );
          aSel->setSelectedObjects( IOs );
-          new SMESHGUI_StandardMeshInfosDlg(desktop(), "", false);
+          new SMESHGUI_StandardMeshInfosDlg( this, "", false);
         }
         // restore selection
        aSel->setSelectedObjects( selected );
       }
       else
-        new SMESHGUI_StandardMeshInfosDlg(desktop(), "", false);
+        new SMESHGUI_StandardMeshInfosDlg( this, "", false);
       break;
     } 
     
@@ -1759,13 +1754,13 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
 
   case 1005:
     {
-      SMESHGUI_Preferences_ScalarBarDlg::ScalarBarPreferences( desktop() );
+      SMESHGUI_Preferences_ScalarBarDlg::ScalarBarPreferences( this );
       break;
     }
 
   case 10070:
     {
-      ( new SMESHGUI_PrecisionDlg( desktop() ) )->exec();
+      ( new SMESHGUI_PrecisionDlg( this ) )->exec();
       break;
     }
 
@@ -1782,7 +1777,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
   case 1006:
     {
       SMESHGUI_Preferences_SelectionDlg* aDlg = 
-       new SMESHGUI_Preferences_SelectionDlg(desktop());
+       new SMESHGUI_Preferences_SelectionDlg( this );
 
       QColor aColor = mgr->colorValue( "SMESH", "SettingsPreSelectColor", Qt::cyan );
       aDlg->SetColor(1, aColor);
@@ -1944,8 +1939,8 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
        Handle(SALOME_InteractiveObject) IObject = It.Value();
        SMESH::RemoveHypothesisOrAlgorithmOnMesh(IObject);
       }
-      SALOME_ListIO selected1;
-      aSel->setSelectedObjects( selected1 );
+      SALOME_ListIO l1;
+      aSel->setSelectedObjects( l1 );
       updateObjBrowser();
       break;
     }
@@ -2034,7 +2029,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       if(checkLock(aStudy)) break;
       if( vtkwnd ) {
        EmitSignalDeactivateDialog();
-       new SMESHGUI_RenumberingDlg(desktop(), "", selectionMgr(), 0);
+       new SMESHGUI_RenumberingDlg( this, "", 0);
       }
       else
        {
@@ -2049,7 +2044,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       if(checkLock(aStudy)) break;
       if ( vtkwnd ) {
        EmitSignalDeactivateDialog();
-       new SMESHGUI_RenumberingDlg(desktop(), "", selectionMgr(), 1);
+       new SMESHGUI_RenumberingDlg( this, "", 1);
       }
       else
        {
@@ -3017,24 +3012,25 @@ void SMESHGUI::initialize( CAM_Application* app )
   popupMgr()->insert( separator(), -1, -1 );
 }
 
-void SMESHGUI::activateModule( SUIT_Study* study )
+bool SMESHGUI::activateModule( SUIT_Study* study )
 {
-  SalomeApp_Module::activateModule( study );
+  bool res = SalomeApp_Module::activateModule( study );
 
   setMenuShown( true );
   setToolShown( true );
 
+  return res;
   //SetSettings( desktop() );
 }
 
-void SMESHGUI::deactivateModule( SUIT_Study* study )
+bool SMESHGUI::deactivateModule( SUIT_Study* study )
 {
   setMenuShown( false );
   setToolShown( false );
 
   EmitSignalCloseAllDialogs();
   
-  SalomeApp_Module::deactivateModule( study );
+  return SalomeApp_Module::deactivateModule( study );
 }
 
 void SMESHGUI::OnGUIEvent()