From f7fcf0ec2d5bf90d9290f277b7ac50e00874f557 Mon Sep 17 00:00:00 2001 From: enk Date: Fri, 28 Apr 2006 05:45:24 +0000 Subject: [PATCH] Bug IPAL11962: Fix for - the preview is still in the viewer. --- src/VISUGUI/VisuGUI_CutLinesDlg.cxx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/VISUGUI/VisuGUI_CutLinesDlg.cxx b/src/VISUGUI/VisuGUI_CutLinesDlg.cxx index c1834f3f..0cf1557f 100644 --- a/src/VISUGUI/VisuGUI_CutLinesDlg.cxx +++ b/src/VISUGUI/VisuGUI_CutLinesDlg.cxx @@ -365,10 +365,20 @@ void VisuGUI_CutLinesDlg::createPlanes() void VisuGUI_CutLinesDlg::deletePlanes() { if (myPreviewActor == 0) return; - if (SVTK_ViewWindow* aView = VISU::GetActiveViewWindow()){ - aView->RemoveActor(myPreviewActor); - aView->RemoveActor(myPreviewActorGlyphs); - } + SVTK_ViewWindow* aView; + vtkRenderer* aRend = myPreviewActor->GetRenderer(); + vtkRenderer* aRendGlyphs = myPreviewActorGlyphs->GetRenderer(); + if(aRend) + myPreviewActor->RemoveFromRender(aRend); + if(aRendGlyphs) + myPreviewActorGlyphs->RemoveFromRender(aRendGlyphs); + +// Bug IPAL11962: preview is still in the viewer, if viewer not active. +// if (aView = VISU::GetActiveViewWindow()){ +// aView->RemoveActor(myPreviewActor); +// aView->RemoveActor(myPreviewActorGlyphs); +// } + myPreviewActor->Delete(); myPreviewActorGlyphs->Delete(); myPreviewActor = 0; -- 2.39.2