From cdc1a08a6c2200d53180d5dcb73556fa5b266733 Mon Sep 17 00:00:00 2001 From: apo Date: Fri, 2 Dec 2005 15:16:16 +0000 Subject: [PATCH] To provide the possibility to display the GaussPoints presentation into standard SALOME VTK viewer --- src/OBJECT/VISU_GaussPtsAct.cxx | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/OBJECT/VISU_GaussPtsAct.cxx b/src/OBJECT/VISU_GaussPtsAct.cxx index 393fb46b..5743b3ba 100644 --- a/src/OBJECT/VISU_GaussPtsAct.cxx +++ b/src/OBJECT/VISU_GaussPtsAct.cxx @@ -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; } -- 2.39.2