]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix for a bug with wrong selection in VTK viewer (module object selected in Object... OCC_3_2_0a2_TC
authorasv <asv@opencascade.com>
Mon, 20 Mar 2006 14:47:30 +0000 (14:47 +0000)
committerasv <asv@opencascade.com>
Mon, 20 Mar 2006 14:47:30 +0000 (14:47 +0000)
src/SVTK/SALOME_Actor.cxx
src/SVTK/SVTK_InteractorStyle.cxx

index 9b1b7937d02b90b562884b45d15d114651c3b99c..7b803a5b6e1c88d96febbe3f548a26e00f266ac7 100644 (file)
@@ -515,10 +515,13 @@ SALOME_Actor
   //
   Selection_Mode aSelectionMode = theSelectionEvent->mySelectionMode;
   bool anIsShift = theSelectionEvent->myIsShift;
-  if( !anIsShift ) {
+  if( !anIsShift || !theIsHighlight ) {
     mySelector->RemoveIObject( this );
   }
 
+  if ( !theIsHighlight )
+    return true;
+
   float x = theSelectionEvent->myX;
   float y = theSelectionEvent->myY;
   float z = 0.0;
index 963aa1894733d7fd039d7a8b89608e7d78c9fa16..b6711c6a79714be183e829071ca730700d8ffcef 100644 (file)
@@ -909,13 +909,15 @@ SVTK_InteractorStyle
          //
          SALOME_Actor* anActor = GetFirstSALOMEActor(myPicker.GetPointer());
          aSelectionEvent->myIsRectangle = false;
+
+         if(!myShiftState)
+           GetSelector()->ClearIObjects();
+
          if(anActor){
            anActor->Highlight( this, aSelectionEvent, true );
          }else{
            if(myLastHighlitedActor.GetPointer() && myLastHighlitedActor.GetPointer() != anActor)
              myLastHighlitedActor->Highlight( this, aSelectionEvent, false );
-           if(!myShiftState)
-             GetSelector()->ClearIObjects();
          }
          myLastHighlitedActor = anActor;
        }