]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
ILMAB project.
authoreap <eap@opencascade.com>
Thu, 3 Oct 2013 14:09:33 +0000 (14:09 +0000)
committereap <eap@opencascade.com>
Thu, 3 Oct 2013 14:09:33 +0000 (14:09 +0000)
Prevent adding same labels in _freeLabels

src/GEOM/GEOM_Engine.cxx

index e6b7e6ba5984f391e9ec2a70f278e3c6b60c58c5..711ef4595e6e3c9c44f27cc1ff8cb339e5ecb91a 100644 (file)
@@ -488,7 +488,8 @@ bool GEOM_Engine::RemoveObject(Handle(GEOM_BaseObject)& theObject)
 
   // Remember the label to reuse it then
   std::list<TDF_Label>& aFreeLabels = _freeLabels[aDocID];
-  aFreeLabels.push_back(aLabel);
+  if ( aFreeLabels.empty() || aFreeLabels.back() != aLabel )
+    aFreeLabels.push_back(aLabel);
 
   theObject.Nullify();