From: eap Date: Mon, 22 Jul 2013 13:57:32 +0000 (+0000) Subject: Bug: mesh is not destructed (leaks) after element selection. X-Git-Tag: BR_hydro_v_0_3_1~104 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a48e2133ac843c24e4e25dad47c7caa538f8716d;p=modules%2Fgui.git 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(); --- 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);