From 0a2880d4a944c976b20cd27037875428d3fce529 Mon Sep 17 00:00:00 2001 From: ouv Date: Tue, 13 May 2008 12:07:32 +0000 Subject: [PATCH] Unification of the VISU selection functionality --- src/OBJECT/VISU_GaussPtsAct.cxx | 2 ++ src/OBJECT/VISU_GaussPtsSettings.cxx | 6 ++++++ src/OBJECT/VISU_GaussPtsSettings.h | 9 +++++++-- 3 files changed, 15 insertions(+), 2 deletions(-) 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; -- 2.39.2