From: mpv Date: Thu, 3 Sep 2015 13:56:12 +0000 (+0300) Subject: Fir for issue #899: all results now have "_index" suffix, including the first one. X-Git-Tag: V_1.4.0_beta4~131 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9dca40b5713b233b58142993d850913485023ee0;p=modules%2Fshaper.git Fir for issue #899: all results now have "_index" suffix, including the first one. --- diff --git a/src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp b/src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp index 64cd49884..147efefd8 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp @@ -37,7 +37,7 @@ std::shared_ptr FeaturesPlugin_CompositeBoolean::addFeature(st if (aNew) { data()->reference(SKETCH_OBJECT_ID())->setValue(aNew); } - // set as current also after it becomes sub to set correctly enabled for other sketch subs + // set as current also after it becomes sub to set correctly enabled for other sketch subs document()->setCurrentFeature(aNew, false); return aNew; } diff --git a/src/Model/Model_Objects.cpp b/src/Model/Model_Objects.cpp index e638e7e41..489ed63d1 100644 --- a/src/Model/Model_Objects.cpp +++ b/src/Model/Model_Objects.cpp @@ -778,7 +778,8 @@ void Model_Objects::storeResult(std::shared_ptr theFeatureData, if (theResult->data()->name().empty()) { // if was not initialized, generate event and set a name std::stringstream aNewName; aNewName<name(); - if (theResultIndex > 0) // if there are several results, add unique prefix starting from second + // if there are several results (issue #899: any number of result), add unique prefix starting from second + if (theResultIndex >= 0) aNewName<<"_"<data()->setName(aNewName.str()); }