]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To provide the possibility to display the GaussPoints presentation into standard...
authorapo <apo@opencascade.com>
Fri, 2 Dec 2005 15:16:16 +0000 (15:16 +0000)
committerapo <apo@opencascade.com>
Fri, 2 Dec 2005 15:16:16 +0000 (15:16 +0000)
src/OBJECT/VISU_GaussPtsAct.cxx

index 393fb46b1f1231afa1bea0fef33c1fe33e4a42e9..5743b3baf138c614989cf162972b3fd0fdba0eee 100644 (file)
@@ -897,7 +897,7 @@ VISU_GaussPtsAct
   if(!myInsideCursorSettings || myInsideCursorSettings->GetInitial())
     return;
 
-  if(!myWidgetCtrl->GetEnabled())
+  if(!myWidgetCtrl || !myWidgetCtrl->GetEnabled())
     return;
 
   VISU_GaussPointsPL* aPipeline = theActor->GetPipeLine();
@@ -1076,10 +1076,10 @@ VISU_GaussPtsAct1
 
   Superclass::SetVisibility(theMode);
 
-  myDeviceActor->SetVisibility(GetVisibility() && !myWidgetCtrl->GetEnabled());
-
-  myInsideDeviceActor->SetVisibility(GetVisibility() && myWidgetCtrl->GetEnabled());
-  myOutsideDeviceActor->SetVisibility(GetVisibility() && myWidgetCtrl->GetEnabled());
+  bool anIsSegementation = !myWidgetCtrl || myWidgetCtrl->GetEnabled();
+  myDeviceActor->SetVisibility(GetVisibility() && !anIsSegementation);
+  myInsideDeviceActor->SetVisibility(GetVisibility() && anIsSegementation);
+  myOutsideDeviceActor->SetVisibility(GetVisibility() && anIsSegementation);
 
   mySetVisibilitySignal(GetVisibility());
 }
@@ -1121,7 +1121,7 @@ VISU_GaussPtsAct1
   if(!myOutsideCursorSettings || myOutsideCursorSettings->GetInitial())
     return;
 
-  if(!myWidgetCtrl->GetEnabled())
+  if(!myWidgetCtrl || !myWidgetCtrl->GetEnabled())
     return;
 
   VISU_GaussPointsPL* aPipeline = myOutsideDeviceActor->GetPipeLine();
@@ -1185,11 +1185,13 @@ VISU_GaussPtsAct1
     break;
   case vtkCommand::EnableEvent: 
   case vtkCommand::DisableEvent:
-  case vtkCommand::EndInteractionEvent:
-    myDeviceActor->SetVisibility(GetVisibility() && !myWidgetCtrl->GetEnabled());
-    myInsideDeviceActor->SetVisibility(GetVisibility() && myWidgetCtrl->GetEnabled());
-    myOutsideDeviceActor->SetVisibility(GetVisibility() && myWidgetCtrl->GetEnabled());
+  case vtkCommand::EndInteractionEvent: {
+    bool anIsSegementation = !myWidgetCtrl || myWidgetCtrl->GetEnabled();
+    myDeviceActor->SetVisibility(GetVisibility() && !anIsSegementation);
+    myInsideDeviceActor->SetVisibility(GetVisibility() && anIsSegementation);
+    myOutsideDeviceActor->SetVisibility(GetVisibility() && anIsSegementation);
     break;
+  }
   default:
     break;
   }