]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fir for issue #899: all results now have "_index" suffix, including the first one.
authormpv <mpv@opencascade.com>
Thu, 3 Sep 2015 13:56:12 +0000 (16:56 +0300)
committermpv <mpv@opencascade.com>
Thu, 3 Sep 2015 13:56:12 +0000 (16:56 +0300)
src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp
src/Model/Model_Objects.cpp

index 64cd498840544d1bbf49d6e4e6acfa207242d4f7..147efefd8d7359b48c72444f5f70a765c3770e55 100644 (file)
@@ -37,7 +37,7 @@ std::shared_ptr<ModelAPI_Feature> 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;
 }
index e638e7e411dde3a02789cad6f6aaeb3006b97137..489ed63d19ec2d7264c5caa0572f5597856f4145 100644 (file)
@@ -778,7 +778,8 @@ void Model_Objects::storeResult(std::shared_ptr<ModelAPI_Data> theFeatureData,
   if (theResult->data()->name().empty()) {  // if was not initialized, generate event and set a name
     std::stringstream aNewName;
     aNewName<<theFeatureData->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<<"_"<<theResultIndex + 1;
     theResult->data()->setName(aNewName.str());
   }