bool anInitialHasIndex = isHighlighted();
bool aCurrentHasIndex = theIsHighlight;
- vtkFloatingPointType aZoomFactor = aPickingSettings->GetZoomFactor();
if( !theIsHighlight && mySelectionMode == ActorSelection && isSubElementsHighlighted() )
{
- aZoomFactor *= aZoomFactor;
myIsSubElementsHighlighted = false;
- }
- // Zoom
- if( GetVisibility() && aPickingSettings->GetCameraMovementEnabled() )
- {
- ChangeZoom(aZoomFactor,
- GetRenderer(),
- anInitialHasIndex,
- aCurrentHasIndex);
+ // Zoom
+ if( GetVisibility() && aPickingSettings->GetCameraMovementEnabled() )
+ {
+ vtkFloatingPointType aZoomFactor = aPickingSettings->GetZoomFactor();
+ ChangeZoom(aZoomFactor,
+ GetRenderer(),
+ anInitialHasIndex,
+ aCurrentHasIndex);
+ }
}
Superclass::highlight(theIsHighlight);
myIsSubElementsHighlighted = aCurrentHasIndex;
// Zoom if necessary
- if( anIsVisible && aPickingSettings->GetCameraMovementEnabled() )
+ if( GetVisibility() && aPickingSettings->GetCameraMovementEnabled() )
{
ChangeZoom(aPickingSettings,
GetRenderer(),
if( !anAction )
return;
+ bool isAnyChecked = false;
for( int anId = VISU_ACTOR_SELECTION; anId <= VISU_GAUSS_POINT_SELECTION; anId++ )
{
QAction* aRefAction = action( anId );
+ isAnyChecked |= aRefAction->isChecked();
if( anAction != aRefAction )
aRefAction->setChecked( false );
else if( myPanels.find( SelectionPanelId ) != myPanels.end() )
aSelectionPanel->setSelectionMode( anId - VISU_ACTOR_SELECTION );
}
}
+ // At least one action must be checked
+ if( !isAnyChecked )
+ anAction->setChecked( true );
}
//----------------------------------------------------------------------------