_PTR(SObject) aChildSObject = aChildIter->Value();
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);
}
VISU::RemovableObject_var aRemovableObject = VISU::RemovableObject::_narrow(anObj);
if (!CORBA::is_nil(aRemovableObject)) {
- study->deleteReferencesTo( theSObject );
aRemovableObject->RemoveFromStudy();
}
} else {
}
}
+ // asl, fix for PAL10455: Remove references to SObject
+ SALOMEDS::Study::ListOfSObject* aRefs = aStudyDocument->FindDependances( theSObject );
+ for( int i=0, n=aRefs->length(); i<n; i++ )
+ {
+ SALOMEDS::SObject_var o = (*aRefs)[i];
+ if( o->GetFatherComponent()->ComponentDataType()==theSObject->GetFatherComponent()->ComponentDataType() )
+ {
+ aStudyBuilder->RemoveReference( o );
+ aStudyBuilder->RemoveObjectWithChildren( o );
+ }
+ }
+
// Remove the SObject itself
aStudyBuilder->RemoveObjectWithChildren(theSObject);
}