myRenderer = theRenderer;
VVTK_MainWindow::Initialize(theInteractor);
- if( myStyleSwitchAction->isEnabled() )
+ if( myStyleSwitchAction->isChecked() )
PushInteractorStyle(myInteractorStyle.GetPointer());
connect(myStyleSwitchAction, SIGNAL(toggled(bool)), this, SLOT(OnInteractorStyleSwitch(bool)));
::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);
}
VVTK_MainWindow1
::SetPlanesSegementation(bool theIsOn)
{
- myPlaneSegmentationAction->setEnabled( theIsOn );
+ myPlaneSegmentationAction->setChecked( theIsOn );
OnSegmentationSwitch(myPlaneSegmentationAction);
}
VVTK_MainWindow1
::SetSphereSegementation(bool theIsOn)
{
- mySphereSegmentationAction->setEnabled( theIsOn );
+ mySphereSegmentationAction->setChecked( theIsOn );
OnSegmentationSwitch(mySphereSegmentationAction);
}
VVTK_MainWindow1
::OnSegmentationSwitch(QtxAction* theAction)
{
- bool anIsSegmentationOn = myPlaneSegmentationAction->isEnabled() ||
- mySphereSegmentationAction->isEnabled();
+ bool anIsSegmentationOn = myPlaneSegmentationAction->isChecked() ||
+ mySphereSegmentationAction->isChecked();
if( !theAction )
return;
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 )
{
{
VVTK_MainWindow::Initialize(theInteractor);
- if( myStyleSwitchAction->isEnabled() )
+ if( myStyleSwitchAction->isChecked() )
PushInteractorStyle(myInteractorStyle.GetPointer());
connect(myStyleSwitchAction, SIGNAL(toggled(bool)), this, SLOT(OnInteractorStyleSwitch(bool)));
}