]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Reparent childern from old Root when set new Root
authornds <nds@opencascade.com>
Thu, 3 Nov 2005 08:06:54 +0000 (08:06 +0000)
committernds <nds@opencascade.com>
Thu, 3 Nov 2005 08:06:54 +0000 (08:06 +0000)
src/SUIT/SUIT_Study.cxx

index 9c2af0282d394045b990ba003b537826bd85eecb..799641f16e8b4e079e272d7398f35ae8a0d4439d 100755 (executable)
@@ -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;
 }