From f24c47666623810ecca6ebe666e815a94b68b605 Mon Sep 17 00:00:00 2001 From: asv Date: Mon, 20 Mar 2006 14:47:30 +0000 Subject: [PATCH] Fix for a bug with wrong selection in VTK viewer (module object selected in Object Browser was stored in SVTK selection, and NOT cleared on next single selection, which was a bug). --- src/SVTK/SALOME_Actor.cxx | 5 ++++- src/SVTK/SVTK_InteractorStyle.cxx | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/SVTK/SALOME_Actor.cxx b/src/SVTK/SALOME_Actor.cxx index 9b1b7937d..7b803a5b6 100644 --- a/src/SVTK/SALOME_Actor.cxx +++ b/src/SVTK/SALOME_Actor.cxx @@ -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; diff --git a/src/SVTK/SVTK_InteractorStyle.cxx b/src/SVTK/SVTK_InteractorStyle.cxx index 963aa1894..b6711c6a7 100644 --- a/src/SVTK/SVTK_InteractorStyle.cxx +++ b/src/SVTK/SVTK_InteractorStyle.cxx @@ -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; } -- 2.39.2