From: ouv Date: Wed, 15 Feb 2012 08:46:53 +0000 (+0000) Subject: Check for presence of the actor's interactive object before prehighlight and highlight. X-Git-Tag: CTH_1_7_3~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e1344b04e8ce10c2977e8bf77cf48c5fffc4dd98;p=modules%2Fgui.git Check for presence of the actor's interactive object before prehighlight and highlight. --- 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; + } } } }