From c5195beeb83d3c68c9b3d557b1f93b8ee467ea5c Mon Sep 17 00:00:00 2001 From: mpv Date: Fri, 10 Jul 2015 07:51:43 +0300 Subject: [PATCH] Decrease automatic numbering by one: feature is already in the map --- src/Model/Model_Objects.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Model_Objects.cpp b/src/Model/Model_Objects.cpp index b6ebc0869..72544d26e 100644 --- a/src/Model/Model_Objects.cpp +++ b/src/Model/Model_Objects.cpp @@ -469,7 +469,7 @@ void Model_Objects::setUniqueName(FeaturePtr theFeature) return; // not needed, name is already defined std::string aName; // result // first count all features of such kind to start with index = count + 1 - int aNumObjects = 0; + int aNumObjects = -1; // this feature is already in this map NCollection_DataMap::Iterator aFIter(myFeatures); for (; aFIter.More(); aFIter.Next()) { if (aFIter.Value()->getKind() == theFeature->getKind()) -- 2.39.2