Salome HOME
Moved some functionality to VTKViewer_Utilities.h
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_TargetAttribute.cxx
index a043b9610a2483fa6068879ae07db2a7984dd9ff..a57efc214fa38e934fc7fd4e65f4589f178cf441 100644 (file)
 //  File   : SALOMEDS_TargetAttribute.cxx
 //  Author : Yves FRICAUD
 //  Module : SALOME
-//  $Header:  
+//  $Header$
 
-using namespace std;
 #include "SALOMEDS_TargetAttribute.ixx"
 #include <TDF_Reference.hxx>
 #include <TDF_ListIteratorOfAttributeList.hxx>
 #include "utilities.h"
+using namespace std;
 
 //=======================================================================
 //function : GetID
@@ -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: PAL6192    
     GetVariables().Append(aReference);
   } else {
     MESSAGE("SALOMEDS_TargetAttribute::Append: can't append referenced object");