Commit f5036717 authored by Sankhesh Jhaveri's avatar Sankhesh Jhaveri 💬 Committed by Kitware Robot
Browse files

Merge topic 'widget_renderer'

69048a52

 Ensure that the representation is removed from renderer
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Ken Martin's avatarKen Martin <ken.martin@kitware.com>
Merge-request: !4802
parents 2d014749 69048a52
......@@ -57,9 +57,10 @@ vtkAbstractWidget::~vtkAbstractWidget()
if ( this->WidgetRep )
{
// Remove the representation from the renderer.
if (this->CurrentRenderer)
vtkRenderer* ren = this->WidgetRep->GetRenderer();
if (ren)
{
this->CurrentRenderer->RemoveViewProp(this->WidgetRep);
ren->RemoveViewProp(this->WidgetRep);
}
this->WidgetRep->Delete();
this->WidgetRep = nullptr;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment