]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Check for presence of the actor's interactive object before prehighlight and highlight.
authorouv <ouv@opencascade.com>
Wed, 15 Feb 2012 08:46:53 +0000 (08:46 +0000)
committerouv <ouv@opencascade.com>
Wed, 15 Feb 2012 08:46:53 +0000 (08:46 +0000)
src/SVTK/SVTK_InteractorStyle.cxx

index 5d3599e71fcc2ba4732d1bf4516a715e086fcfe8..d9286014f9355370ef8c488f28ee6cd22b4144fd 100644 (file)
@@ -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;
+            }
           }
         }
       }