]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Added vtkSmartPointer for myLastHighlitedActor and myLastPrehighlitedActor.
authorouv <ouv@opencascade.com>
Thu, 17 Nov 2005 13:25:23 +0000 (13:25 +0000)
committerouv <ouv@opencascade.com>
Thu, 17 Nov 2005 13:25:23 +0000 (13:25 +0000)
src/SVTK/SVTK_InteractorStyle.cxx
src/SVTK/SVTK_InteractorStyle.h

index 2f8100b5724d1fd7b87c3f0d85d6569234b3e3dd..4d836bb21969b9ba9e342e48d28a8f8ffca9fc12 100644 (file)
@@ -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;
index a97480dde29b02a001be861faf9046cc5aff7281..be7663d7fff23dde87de849fd84bca94c07b5379 100644 (file)
@@ -227,8 +227,8 @@ class SVTK_EXPORT SVTK_InteractorStyle: public vtkInteractorStyle
   bool                      myShiftState;
   int                       ForcedState;
 
-  SALOME_Actor*             myLastHighlitedActor;
-  SALOME_Actor*             myLastPreHighlitedActor;
+  vtkSmartPointer<SALOME_Actor> myLastHighlitedActor;
+  vtkSmartPointer<SALOME_Actor> myLastPreHighlitedActor;
 
   //! "Increment" for pan/rotate/zoom operations
   int                       mySpeedIncrement;