]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Fix on
authorsmh <smh@opencascade.com>
Mon, 7 Jun 2004 08:28:23 +0000 (08:28 +0000)
committersmh <smh@opencascade.com>
Mon, 7 Jun 2004 08:28:23 +0000 (08:28 +0000)
KERNEL6040, if there already has been appended the given reference then nothing to do

src/SALOMEDS/SALOMEDS_TargetAttribute.cxx

index 004fd69730542957f50a03b369bd426c61d10777..16e7fd90850d0be2d46fad35ef1998311be83444 100644 (file)
@@ -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");