From: enk Date: Fri, 28 Apr 2006 05:45:24 +0000 (+0000) Subject: Bug IPAL11962: X-Git-Tag: mergeto_trunk_06May06~16 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f7fcf0ec2d5bf90d9290f277b7ac50e00874f557;p=modules%2Fvisu.git Bug IPAL11962: Fix for - the preview is still in the viewer. --- 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;