From 9dca40b5713b233b58142993d850913485023ee0 Mon Sep 17 00:00:00 2001 From: mpv Date: Thu, 3 Sep 2015 16:56:12 +0300 Subject: [PATCH] Fir for issue #899: all results now have "_index" suffix, including the first one. --- src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp | 2 +- src/Model/Model_Objects.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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()); } -- 2.39.2