From: ouv Date: Tue, 13 May 2008 12:07:32 +0000 (+0000) Subject: Unification of the VISU selection functionality X-Git-Tag: TG_VISU_2008_2008-06-26~50 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0a2880d4a944c976b20cd27037875428d3fce529;p=modules%2Fvisu.git Unification of the VISU selection functionality --- diff --git a/src/OBJECT/VISU_GaussPtsAct.cxx b/src/OBJECT/VISU_GaussPtsAct.cxx index 8ca84bc9..8d30e245 100644 --- a/src/OBJECT/VISU_GaussPtsAct.cxx +++ b/src/OBJECT/VISU_GaussPtsAct.cxx @@ -297,6 +297,8 @@ VISU_GaussPtsAct myCursorPyramid->AddToRender(theRenderer); myCursorPyramidSelected->AddToRender(theRenderer); myScalarBarCtrl->AddToRender(theRenderer); + + SetPickingSettings( VISU_PickingSettings::Get() ); } void diff --git a/src/OBJECT/VISU_GaussPtsSettings.cxx b/src/OBJECT/VISU_GaussPtsSettings.cxx index e1c59248..196e5c6c 100644 --- a/src/OBJECT/VISU_GaussPtsSettings.cxx +++ b/src/OBJECT/VISU_GaussPtsSettings.cxx @@ -84,6 +84,12 @@ VISU_OutsideCursorSettings::~VISU_OutsideCursorSettings() } //---------------------------------------------------------------- +VISU_PickingSettings* VISU_PickingSettings::Get() +{ + static VISU_PickingSettings* aPickingSettings = VISU_PickingSettings::New(); + return aPickingSettings; +} + VISU_PickingSettings::VISU_PickingSettings() { this->Initial = true; diff --git a/src/OBJECT/VISU_GaussPtsSettings.h b/src/OBJECT/VISU_GaussPtsSettings.h index 473ddd10..3d738952 100644 --- a/src/OBJECT/VISU_GaussPtsSettings.h +++ b/src/OBJECT/VISU_GaussPtsSettings.h @@ -179,8 +179,9 @@ class VTKOCC_EXPORT VISU_PickingSettings : public vtkObject public: vtkTypeMacro( VISU_PickingSettings, vtkObject ); - VISU_PickingSettings(); - virtual ~VISU_PickingSettings(); + static + VISU_PickingSettings* + Get(); static VISU_PickingSettings* @@ -216,6 +217,10 @@ class VTKOCC_EXPORT VISU_PickingSettings : public vtkObject vtkSetMacro( DisplayParentMesh, bool ); vtkGetMacro( DisplayParentMesh, bool ); +private: + VISU_PickingSettings(); + virtual ~VISU_PickingSettings(); + private: bool Initial;