From a48e2133ac843c24e4e25dad47c7caa538f8716d Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 22 Jul 2013 13:57:32 +0000 Subject: [PATCH] Bug: mesh is not destructed (leaks) after element selection. In RemoveActor(), remove actors from SVTK_InteractorStyle's as well + if ( myDefaultInteractorStyle ) + myDefaultInteractorStyle->FreeActors(); + if ( myKeyFreeInteractorStyle ) + myKeyFreeInteractorStyle->FreeActors(); --- src/SVTK/SVTK_ViewWindow.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/SVTK/SVTK_ViewWindow.cxx b/src/SVTK/SVTK_ViewWindow.cxx index 757193b53..4f7091ac4 100755 --- a/src/SVTK/SVTK_ViewWindow.cxx +++ b/src/SVTK/SVTK_ViewWindow.cxx @@ -1101,6 +1101,10 @@ void SVTK_ViewWindow::RemoveActor( VTKViewer_Actor* theActor, bool theIsAdjustActors ) { GetRenderer()->RemoveActor(theActor, theIsAdjustActors); + if ( myDefaultInteractorStyle ) + myDefaultInteractorStyle->FreeActors(); + if ( myKeyFreeInteractorStyle ) + myKeyFreeInteractorStyle->FreeActors(); if(theUpdate) Repaint(); emit actorRemoved(theActor); -- 2.30.2