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;
}
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());
}