From: mpv Date: Fri, 10 Jul 2015 04:51:43 +0000 (+0300) Subject: Decrease automatic numbering by one: feature is already in the map X-Git-Tag: V_1.3.0~45 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c5195beeb83d3c68c9b3d557b1f93b8ee467ea5c;p=modules%2Fshaper.git Decrease automatic numbering by one: feature is already in the map --- 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())