//
myPreHighlightActor->SetVisibility( false );
- bool anIsSelectionModeChanged = (theSelectionEvent->mySelectionMode != mySelectionMode);
- if(!anIsSelectionModeChanged && mySelectionMode == ActorSelection)
- return false;
+ bool anIsChanged = (mySelectionMode != theSelectionEvent->mySelectionMode);
mySelectionMode = theSelectionEvent->mySelectionMode;
float y = theSelectionEvent->myY;
float z = 0.0;
-
- bool anIsChanged = false;
if( !theIsHighlight )
{
+ SetPreSelected( false );
vtkActorCollection* theActors = aRenderer->GetActors();
theActors->InitTraversal();
while( vtkActor *ac = theActors->GetNextActor() )
if( anActor->hasIO() && myIO->isSame( anActor->getIO() ) )
anActor->SetPreSelected( false );
- myIsPreselected = theIsHighlight;
anIsChanged = true;
}else{
switch(mySelectionMode){
}
default:
{
- myPreHighlightActor->SetVisibility( true );
-
if( hasIO() && !theSelector->IsSelected( myIO ) )
{
+ SetPreSelected( true );
+
vtkActorCollection* theActors = aRenderer->GetActors();
theActors->InitTraversal();
- while( vtkActor *ac = theActors->GetNextActor() )
+ while( vtkActor *anAct = theActors->GetNextActor() )
{
- if( SALOME_Actor* anActor = SALOME_Actor::SafeDownCast( ac ) )
- if( anActor->hasIO() && myIO->isSame( anActor->getIO() ) )
- anActor->SetPreSelected( true );
+ if( anAct != this )
+ if( SALOME_Actor* anActor = SALOME_Actor::SafeDownCast( anAct ) )
+ if( anActor->hasIO() && myIO->isSame( anActor->getIO() ) )
+ anActor->SetPreSelected( true );
}
}
- myIsPreselected = theIsHighlight;
+
anIsChanged = true;
}
}
this->FindPokedRenderer(aSelectionEvent->myX,aSelectionEvent->myY);
bool anIsChanged = false;
- SALOME_Actor* aLastActor = SALOME_Actor::SafeDownCast(myPicker->GetActor());
+ if(SALOME_Actor* aLastActor = SALOME_Actor::SafeDownCast(myPicker->GetActor()))
+ anIsChanged |= aLastActor->PreHighlight( GetSelector(), this, aSelectionEvent, false );
myPicker->Pick(aSelectionEvent->myX,
aSelectionEvent->myY,
if(SALOME_Actor* anActor = SALOME_Actor::SafeDownCast(myPicker->GetActor())){
anIsChanged |= anActor->PreHighlight( GetSelector(), this, aSelectionEvent, true );
- if(aLastActor && aLastActor != anActor) {
- aLastActor->PreHighlight( GetSelector(), this, aSelectionEvent, false );
- }
}
if(anIsChanged)