removeView( view );
if ( view )
- delete view;
+ view->deleteLater();
}
/*!Remove view window \a theView from view manager.
{
for ( int i = 0; i < myViews.size(); i++ ){
if( !myViews[i].isNull() )
- delete myViews[i];
+ myViews[i]->hide();
+ myViews[i]->deleteLater();
}
myViews.clear();
}
myCubeAxes(SVTK_CubeAxesActor2D::New()),
myTrihedron(SVTK_Trihedron::New()),
myTrihedronSize(105),
- myIsTrihedronRelative(true)
+ myIsTrihedronRelative(true),
+ myIsDestroying(false)
{
myDevice->Delete();
myTransform->Delete();
SVTK_Renderer
::~SVTK_Renderer()
{
+ myIsDestroying = true;
+
vtkActorCollection* anActors = GetDevice()->GetActors();
vtkActorCollection* anActors2 = vtkActorCollection::New();
anActor->SetHighlightProperty(NULL);
anActor->RemoveFromRender(GetDevice());
- AdjustActors();
+
+ if ( !myIsDestroying )
+ AdjustActors();
}
}