Salome HOME
PAL9636
authorasl <asl@opencascade.com>
Fri, 26 Aug 2005 06:14:56 +0000 (06:14 +0000)
committerasl <asl@opencascade.com>
Fri, 26 Aug 2005 06:14:56 +0000 (06:14 +0000)
src/VISUGUI/VisuGUI_Tools.cxx

index a4f91d61cd546399d2e7d124e65c8b9ccdea5a56..246590070e6f1abe50e8c1f0f4533251c3e1964d 100644 (file)
@@ -391,9 +391,13 @@ namespace VISU
                  _PTR(Study)       theStudy,
                  _PTR(SObject)     theSObject)
   {
+    SalomeApp_Study* study = GetAppStudy( theModule );
+    study->deleteReferencesTo( theSObject );
+
     _PTR(ChildIterator) aChildIter = theStudy->NewChildIterator(theSObject);
     for (aChildIter->InitEx(true); aChildIter->More(); aChildIter->Next()) {
       _PTR(SObject) aChildSObject = aChildIter->Value();
+      study->deleteReferencesTo( aChildSObject );
       CORBA::Object_var aChildObj = VISU::ClientSObjectToObject(aChildSObject);
       ErasePrs(theModule, aChildObj);
     }
@@ -408,6 +412,7 @@ namespace VISU
       }
     } else {
       // Remove aSObject together with all its sub-objects
+      
       VISU::RemoveFromStudy(theSObject,
                             false,  // remove not only IOR attribute, but Object With Children
                             false); // not Destroy() sub-objects