]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Bug IPAL11962:
authorenk <enk@opencascade.com>
Fri, 28 Apr 2006 05:56:41 +0000 (05:56 +0000)
committerenk <enk@opencascade.com>
Fri, 28 Apr 2006 05:56:41 +0000 (05:56 +0000)
Fix for - the preview is still in the viewer.

src/VISUGUI/VisuGUI_CutPlanesDlg.cxx

index 3d6989a542a878753a379eb385254750ff4c9f98..85bc997f66e3ea7378b7585d91da6eebf898b07a 100644 (file)
@@ -420,8 +420,12 @@ void VisuGUI_CutPlanesPane::onValueChanged (int theRow, int theCol)
 void VisuGUI_CutPlanesPane::deletePlanes()
 {
   if (myPreviewActor == 0) return;
-  if (SVTK_ViewWindow* vf = VISU::GetActiveViewWindow<SVTK_ViewWindow>())
-    vf->RemoveActor(myPreviewActor);
+  vtkRenderer* aRend       = myPreviewActor->GetRenderer();
+  if(aRend)
+    myPreviewActor->RemoveFromRender(aRend);
+//  Bug IPAL11962: preview is still in the viewer, if viewer not active.
+//   if (SVTK_ViewWindow* vf = VISU::GetActiveViewWindow<SVTK_ViewWindow>())
+//     vf->RemoveActor(myPreviewActor);
   myPreviewActor->Delete();
   myPreviewActor = 0;
 }