]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix for IPAL19177.
authormkr <mkr@opencascade.com>
Tue, 11 Mar 2008 09:03:54 +0000 (09:03 +0000)
committermkr <mkr@opencascade.com>
Tue, 11 Mar 2008 09:03:54 +0000 (09:03 +0000)
src/VVTK/VVTK_MainWindow.cxx

index 32e72a7d61d54d91d0ab0ff45542beeeb2d3a4c2..b4875ca249e1527c15cc66035de200221d468041 100644 (file)
@@ -372,7 +372,7 @@ VVTK_MainWindow1
   myRenderer = theRenderer;
   VVTK_MainWindow::Initialize(theInteractor);
 
-  if( myStyleSwitchAction->isEnabled() )
+  if( myStyleSwitchAction->isChecked() )
     PushInteractorStyle(myInteractorStyle.GetPointer());
   connect(myStyleSwitchAction, SIGNAL(toggled(bool)), this, SLOT(OnInteractorStyleSwitch(bool)));
 
@@ -432,10 +432,10 @@ VVTK_MainWindow1
 ::OnSelectionChanged()
 {
   Selection_Mode aSelectionMode = SelectionMode();
-  if(myPickingAction->isEnabled() && aSelectionMode != GaussPointSelection)
-    myPickingAction->setEnabled(false);
-  else if(!myPickingAction->isEnabled() && aSelectionMode == GaussPointSelection)
-    myPickingAction->setEnabled(true);
+  if(myPickingAction->isChecked() && aSelectionMode != GaussPointSelection)
+    myPickingAction->setChecked(false);
+  else if(!myPickingAction->isChecked() && aSelectionMode == GaussPointSelection)
+    myPickingAction->setChecked(true);
 }
 
 
@@ -473,7 +473,7 @@ void
 VVTK_MainWindow1
 ::SetPlanesSegementation(bool theIsOn)
 {
-  myPlaneSegmentationAction->setEnabled( theIsOn );
+  myPlaneSegmentationAction->setChecked( theIsOn );
   OnSegmentationSwitch(myPlaneSegmentationAction);
 }
 
@@ -481,7 +481,7 @@ void
 VVTK_MainWindow1
 ::SetSphereSegementation(bool theIsOn)
 {
-  mySphereSegmentationAction->setEnabled( theIsOn );
+  mySphereSegmentationAction->setChecked( theIsOn );
   OnSegmentationSwitch(mySphereSegmentationAction);
 }
 
@@ -489,8 +489,8 @@ void
 VVTK_MainWindow1
 ::OnSegmentationSwitch(QtxAction* theAction)
 {
-  bool anIsSegmentationOn = myPlaneSegmentationAction->isEnabled() ||
-    mySphereSegmentationAction->isEnabled();
+  bool anIsSegmentationOn = myPlaneSegmentationAction->isChecked() ||
+    mySphereSegmentationAction->isChecked();
 
   if( !theAction )
     return;
@@ -504,9 +504,9 @@ VVTK_MainWindow1
   aWidgetCtrl->SetEnabled(anIsSegmentationOn);
 
   if( theAction == myPlaneSegmentationAction && anIsSegmentationOn )
-    mySphereSegmentationAction->setEnabled( false );
+    mySphereSegmentationAction->setChecked( false );
   else if( theAction == mySphereSegmentationAction && anIsSegmentationOn )
-    myPlaneSegmentationAction->setEnabled( false );
+    myPlaneSegmentationAction->setChecked( false );
 
   if( anIsSegmentationOn )
   {
@@ -556,7 +556,7 @@ VVTK_MainWindow2
 {
   VVTK_MainWindow::Initialize(theInteractor);
 
-  if( myStyleSwitchAction->isEnabled() )
+  if( myStyleSwitchAction->isChecked() )
     PushInteractorStyle(myInteractorStyle.GetPointer());
   connect(myStyleSwitchAction, SIGNAL(toggled(bool)), this, SLOT(OnInteractorStyleSwitch(bool)));
 }