Salome HOME
add necessary include <qpixmap.h>
[modules/gui.git] / 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;
 }