From 8b28597ec2263844765dc1b297da8fd20751bb29 Mon Sep 17 00:00:00 2001 From: ouv Date: Thu, 17 Nov 2005 13:25:23 +0000 Subject: [PATCH] Added vtkSmartPointer for myLastHighlitedActor and myLastPrehighlitedActor. --- src/SVTK/SVTK_InteractorStyle.cxx | 4 ++-- src/SVTK/SVTK_InteractorStyle.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/SVTK/SVTK_InteractorStyle.cxx b/src/SVTK/SVTK_InteractorStyle.cxx index 2f8100b57..4d836bb21 100644 --- a/src/SVTK/SVTK_InteractorStyle.cxx +++ b/src/SVTK/SVTK_InteractorStyle.cxx @@ -920,7 +920,7 @@ SVTK_InteractorStyle if(anActor){ anActor->Highlight( this, aSelectionEvent, true ); }else{ - if(myLastHighlitedActor && myLastHighlitedActor != anActor) + if(myLastHighlitedActor.GetPointer() && myLastHighlitedActor.GetPointer() != anActor) myLastHighlitedActor->Highlight( this, aSelectionEvent, false ); GetSelector()->ClearIObjects(); } @@ -1049,7 +1049,7 @@ SVTK_InteractorStyle anIsChanged |= anActor->PreHighlight( this, aSelectionEvent, true ); } - if(myLastPreHighlitedActor && myLastPreHighlitedActor != anActor) + if(myLastPreHighlitedActor.GetPointer() && myLastPreHighlitedActor.GetPointer() != anActor) anIsChanged |= myLastPreHighlitedActor->PreHighlight( this, aSelectionEvent, false ); myLastPreHighlitedActor = anActor; diff --git a/src/SVTK/SVTK_InteractorStyle.h b/src/SVTK/SVTK_InteractorStyle.h index a97480dde..be7663d7f 100644 --- a/src/SVTK/SVTK_InteractorStyle.h +++ b/src/SVTK/SVTK_InteractorStyle.h @@ -227,8 +227,8 @@ class SVTK_EXPORT SVTK_InteractorStyle: public vtkInteractorStyle bool myShiftState; int ForcedState; - SALOME_Actor* myLastHighlitedActor; - SALOME_Actor* myLastPreHighlitedActor; + vtkSmartPointer myLastHighlitedActor; + vtkSmartPointer myLastPreHighlitedActor; //! "Increment" for pan/rotate/zoom operations int mySpeedIncrement; -- 2.39.2