From 1ce6ce7897089ad549b47d5d8f871a894d6d6039 Mon Sep 17 00:00:00 2001 From: smh Date: Mon, 7 Jun 2004 08:28:23 +0000 Subject: [PATCH] Fix on KERNEL6040, if there already has been appended the given reference then nothing to do --- src/SALOMEDS/SALOMEDS_TargetAttribute.cxx | 2 ++ 1 file changed, 2 insertions(+) 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"); -- 2.39.2