Fix for Bug GVIEW10346

Previews of Local coordinate system remain in VTK.
This commit is contained in:
apo 2006-01-12 07:47:38 +00:00
parent 96478dfdc2
commit e3949b7f11
2 changed files with 6 additions and 7 deletions

View File

@ -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)

View File

@ -89,7 +89,6 @@ public:
virtual bool hasHighlight() { return false; }
protected:
vtkActorCollection* myPresent;
VTKViewer_Axis* myAxis[3];
vtkPolyDataMapper* myMapper;
float mySize;