From: smh Date: Mon, 7 Jun 2004 08:28:23 +0000 (+0000) Subject: Fix on X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1ce6ce7897089ad549b47d5d8f871a894d6d6039;p=modules%2Fkernel.git Fix on KERNEL6040, if there already has been appended the given reference then nothing to do --- diff --git a/src/SALOMEDS/SALOMEDS_TargetAttribute.cxx b/src/SALOMEDS/SALOMEDS_TargetAttribute.cxx index 004fd6973..16e7fd908 100644 --- a/src/SALOMEDS/SALOMEDS_TargetAttribute.cxx +++ b/src/SALOMEDS/SALOMEDS_TargetAttribute.cxx @@ -77,6 +77,8 @@ void SALOMEDS_TargetAttribute::Append(TDF_Label& theReferencedObject) { Backup(); Handle(TDF_Reference) aReference; if (theReferencedObject.FindAttribute(TDF_Reference::GetID(),aReference)) { + TDF_ListIteratorOfAttributeList anIter(GetVariables()); + for(;anIter.More();anIter.Next()) if(anIter.Value()->Label() == theReferencedObject) return; //BugID: KERNEL6040, if there is the reference in the list then nothing to do GetVariables().Append(aReference); } else { MESSAGE("SALOMEDS_TargetAttribute::Append: can't append referenced object");