From: asv Date: Mon, 20 Mar 2006 14:47:30 +0000 (+0000) Subject: Fix for a bug with wrong selection in VTK viewer (module object selected in Object... X-Git-Tag: OCC_3_2_0a2_TC X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f24c47666623810ecca6ebe666e815a94b68b605;p=modules%2Fgui.git 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). --- 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; }