From: dmv Date: Mon, 19 May 2008 07:58:39 +0000 (+0000) Subject: NPAL18219 EDF 618 VISU : Regression, Lost of permformance in Vectors representation X-Git-Tag: TG_ELNO_visualization_28May2008~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=dfdf2bfba7304a7c121ae5911653a80b98f6a48d;p=modules%2Fgui.git NPAL18219 EDF 618 VISU : Regression, Lost of permformance in Vectors representation --- diff --git a/src/SVTK/SVTK_Selector.cxx b/src/SVTK/SVTK_Selector.cxx index fe5a93047..d9fd3181c 100644 --- a/src/SVTK/SVTK_Selector.cxx +++ b/src/SVTK/SVTK_Selector.cxx @@ -31,6 +31,9 @@ #include "SALOME_Actor.h" +#include "SUIT_Session.h" +#include "SUIT_ResourceMgr.h" + #include #include @@ -545,15 +548,24 @@ SALOME_Actor* SVTK_SelectorDef ::Pick(const SVTK_SelectionEvent* theEvent, vtkRenderer* theRenderer) const { - myCellPicker->Pick(theEvent->myX, - theEvent->myY, - 0.0, - theRenderer); - - vtkActorCollection* aListActors = myCellPicker->GetActors(); - SALOME_Actor* anActor = GetLastSALOMEActor(aListActors); + bool anAdvancedSelectionAlgorithm = true; + SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr(); + if ( aResourceMgr ) + anAdvancedSelectionAlgorithm = aResourceMgr->booleanValue( "VTKViewer", "use_advanced_selection_algorithm", true ); + + SALOME_Actor* anActor = NULL; + vtkActorCollection* aListActors = NULL; + if ( anAdvancedSelectionAlgorithm ) { + myCellPicker->Pick(theEvent->myX, + theEvent->myY, + 0.0, + theRenderer); - if (! anActor) { + aListActors = myCellPicker->GetActors(); + anActor = GetLastSALOMEActor(aListActors); + } + + if ( !anActor ) { myPicker->Pick(theEvent->myX, theEvent->myY, 0.0,