if(!myInsideCursorSettings || myInsideCursorSettings->GetInitial())
return;
- if(!myWidgetCtrl->GetEnabled())
+ if(!myWidgetCtrl || !myWidgetCtrl->GetEnabled())
return;
VISU_GaussPointsPL* aPipeline = theActor->GetPipeLine();
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());
}
if(!myOutsideCursorSettings || myOutsideCursorSettings->GetInitial())
return;
- if(!myWidgetCtrl->GetEnabled())
+ if(!myWidgetCtrl || !myWidgetCtrl->GetEnabled())
return;
VISU_GaussPointsPL* aPipeline = myOutsideDeviceActor->GetPipeLine();
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;
}