From: eap Date: Fri, 19 Jul 2013 14:28:59 +0000 (+0000) Subject: Bug: mesh is not destructed (leaks) after element selection. X-Git-Tag: BR_hydro_v_0_3_1~107 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6224eec86a923e6e53059829fd5f2bb2147c3ca9;p=modules%2Fgui.git Bug: mesh is not destructed (leaks) after element selection. In RemoveActor(), remove an actor from pickers as well + while ( int i = myCellPicker->GetActors()->IsItemPresent( theActor )) + myCellPicker->GetActors()->RemoveItem( i-1 ); --- diff --git a/src/SVTK/SVTK_Renderer.cxx b/src/SVTK/SVTK_Renderer.cxx index 75c9574a3..e9c8bd6fe 100644 --- a/src/SVTK/SVTK_Renderer.cxx +++ b/src/SVTK/SVTK_Renderer.cxx @@ -47,6 +47,7 @@ #include #include +#include // undefining min and max because CASCADE's defines them and // it clashes with std::min(), std::max() included in utilities.h @@ -283,6 +284,16 @@ SVTK_Renderer anActor->RemoveFromRender(GetDevice()); + while ( int i = myPointPicker->GetProp3Ds()->IsItemPresent( theActor )) + myPointPicker->GetProp3Ds()->RemoveItem( i-1 ); + while ( int i = myCellPicker->GetProp3Ds()->IsItemPresent( theActor )) + myCellPicker->GetProp3Ds()->RemoveItem( i-1 ); + + while ( int i = myPointPicker->GetActors()->IsItemPresent( theActor )) + myPointPicker->GetActors()->RemoveItem( i-1 ); + while ( int i = myCellPicker->GetActors()->IsItemPresent( theActor )) + myCellPicker->GetActors()->RemoveItem( i-1 ); + if(theIsAdjustActors) AdjustActors(); }