From: nds Date: Thu, 3 Nov 2005 08:06:54 +0000 (+0000) Subject: Reparent childern from old Root when set new Root X-Git-Tag: V3_1_0a3~72 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f4709898524b2bcdff3553c8b22b123b2d214f9b;p=modules%2Fgui.git Reparent childern from old Root when set new Root --- diff --git a/src/SUIT/SUIT_Study.cxx b/src/SUIT/SUIT_Study.cxx index 9c2af0282..799641f16 100755 --- a/src/SUIT/SUIT_Study.cxx +++ b/src/SUIT/SUIT_Study.cxx @@ -192,6 +192,10 @@ void SUIT_Study::setRoot( SUIT_DataObject* obj ) if ( myRoot == obj ) return; + // This is necessary in order not to destroy the complete tree of objects + if ( obj ) + obj->reparentChildren( myRoot ); + delete myRoot; myRoot = obj; }