From e3949b7f11856e429b2739500b6db9f46223734a Mon Sep 17 00:00:00 2001 From: apo Date: Thu, 12 Jan 2006 07:47:38 +0000 Subject: [PATCH] Fix for Bug GVIEW10346 Previews of Local coordinate system remain in VTK. --- src/OBJECT/GEOM_VTKTrihedron.cxx | 12 ++++++------ src/OBJECT/GEOM_VTKTrihedron.hxx | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/OBJECT/GEOM_VTKTrihedron.cxx b/src/OBJECT/GEOM_VTKTrihedron.cxx index 67e32cedd..3e79afb81 100644 --- a/src/OBJECT/GEOM_VTKTrihedron.cxx +++ b/src/OBJECT/GEOM_VTKTrihedron.cxx @@ -207,7 +207,6 @@ GEOM_VTKTrihedron::GEOM_VTKTrihedron() { myMapper = vtkPolyDataMapper::New(); myAxis[ 0 ] = myAxis[ 1 ] = myAxis[ 2 ] = 0; - myPresent = vtkActorCollection::New(); mySize = 100; SetInfinitive( true ); myColor[ 0 ] = myColor[ 1 ] = myColor[ 1 ] = -1; @@ -216,8 +215,6 @@ GEOM_VTKTrihedron::GEOM_VTKTrihedron() GEOM_VTKTrihedron::~GEOM_VTKTrihedron() { - myPresent->RemoveAllItems(); - myPresent->Delete(); for ( int i = 0; i < 3; i++ ) myAxis[i]->Delete(); @@ -285,9 +282,12 @@ void GEOM_VTKTrihedron::AddToRender( vtkRenderer* theRenderer ) void GEOM_VTKTrihedron::RemoveFromRender( vtkRenderer* theRenderer ) { - myPresent->InitTraversal(); - while(vtkActor* anActor = myPresent->GetNextActor()) - theRenderer->RemoveActor(anActor); + for(int i = 0; i < 3; i++) + { + myAxis[i]->RemoveFromRender(theRenderer); + } + + theRenderer->RemoveActor( this ); } int GEOM_VTKTrihedron::GetVisibleActorCount(vtkRenderer* theRenderer) diff --git a/src/OBJECT/GEOM_VTKTrihedron.hxx b/src/OBJECT/GEOM_VTKTrihedron.hxx index 92332c8c6..b67ad3fbb 100644 --- a/src/OBJECT/GEOM_VTKTrihedron.hxx +++ b/src/OBJECT/GEOM_VTKTrihedron.hxx @@ -89,7 +89,6 @@ public: virtual bool hasHighlight() { return false; } protected: - vtkActorCollection* myPresent; VTKViewer_Axis* myAxis[3]; vtkPolyDataMapper* myMapper; float mySize; -- 2.39.2