From 161068a9fdd44044f83a819a1c6d1212b3760fad Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 3 Oct 2013 14:09:33 +0000 Subject: [PATCH] ILMAB project. Prevent adding same labels in _freeLabels --- src/GEOM/GEOM_Engine.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/GEOM/GEOM_Engine.cxx b/src/GEOM/GEOM_Engine.cxx index e6b7e6ba5..711ef4595 100644 --- a/src/GEOM/GEOM_Engine.cxx +++ b/src/GEOM/GEOM_Engine.cxx @@ -488,7 +488,8 @@ bool GEOM_Engine::RemoveObject(Handle(GEOM_BaseObject)& theObject) // Remember the label to reuse it then std::list& aFreeLabels = _freeLabels[aDocID]; - aFreeLabels.push_back(aLabel); + if ( aFreeLabels.empty() || aFreeLabels.back() != aLabel ) + aFreeLabels.push_back(aLabel); theObject.Nullify(); -- 2.39.2