From e1344b04e8ce10c2977e8bf77cf48c5fffc4dd98 Mon Sep 17 00:00:00 2001 From: ouv Date: Wed, 15 Feb 2012 08:46:53 +0000 Subject: [PATCH] Check for presence of the actor's interactive object before prehighlight and highlight. --- src/SVTK/SVTK_InteractorStyle.cxx | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/SVTK/SVTK_InteractorStyle.cxx b/src/SVTK/SVTK_InteractorStyle.cxx index 5d3599e71..d9286014f 100644 --- a/src/SVTK/SVTK_InteractorStyle.cxx +++ b/src/SVTK/SVTK_InteractorStyle.cxx @@ -1052,11 +1052,14 @@ void SVTK_InteractorStyle::onFinishOperation() { if( SALOME_Actor* anActor = SALOME_Actor::SafeDownCast( aVTKActor ) ) { - if( anActor->Highlight( this, aSelectionEvent, true ) && - anActor->isHighlighted() ) + if( anActor->hasIO() ) { - aHighlightedActor = anActor; - break; + if( anActor->Highlight( this, aSelectionEvent, true ) && + anActor->isHighlighted() ) + { + aHighlightedActor = anActor; + break; + } } } } @@ -1222,11 +1225,14 @@ void SVTK_InteractorStyle::onCursorMove(QPoint mousePos) { if( SALOME_Actor* anActor = SALOME_Actor::SafeDownCast( aVTKActor ) ) { - anIsChanged = anActor->PreHighlight( this, aSelectionEvent, true ); - if( anActor->isPreselected() ) + if( anActor->hasIO() ) { - aPreHighlightedActor = anActor; - break; + anIsChanged = anActor->PreHighlight( this, aSelectionEvent, true ); + if( anActor->isPreselected() ) + { + aPreHighlightedActor = anActor; + break; + } } } } -- 2.39.2