From: asl Date: Mon, 31 Oct 2005 08:25:17 +0000 (+0000) Subject: PAL10297 - when object is deleted, references to it must be deleted only he is "remov... X-Git-Tag: V3_1_0a3~20 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=83af357a3e484aa6023ab570674c6308b412ef5c;p=modules%2Fvisu.git PAL10297 - when object is deleted, references to it must be deleted only he is "removable" and is removed from study --- diff --git a/src/VISUGUI/VisuGUI_Tools.cxx b/src/VISUGUI/VisuGUI_Tools.cxx index 86f6b654..72f28a92 100644 --- a/src/VISUGUI/VisuGUI_Tools.cxx +++ b/src/VISUGUI/VisuGUI_Tools.cxx @@ -393,13 +393,15 @@ namespace VISU _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); + VISU::RemovableObject_var aRemovableObject = VISU::RemovableObject::_narrow(aChildObj); + if( !CORBA::is_nil( aRemovableObject ) ) + study->deleteReferencesTo( aChildSObject ); ErasePrs(theModule, aChildObj); } @@ -409,6 +411,7 @@ namespace VISU VISU::RemovableObject_var aRemovableObject = VISU::RemovableObject::_narrow(anObj); if (!CORBA::is_nil(aRemovableObject)) { + study->deleteReferencesTo( theSObject ); aRemovableObject->RemoveFromStudy(); } } else { @@ -729,7 +732,7 @@ namespace VISU if (aResActor) return aResActor; - anVISUActor = PublishInView( theModule, thePrs ); + //anVISUActor = PublishInView( theModule, thePrs ); return anVISUActor; }