void FeaturesPlugin_Group::initAttributes()
{
- data()->addAttribute(FeaturesPlugin_Group::NAME_ID(), ModelAPI_AttributeString::type());
+ //data()->addAttribute(FeaturesPlugin_Group::NAME_ID(), ModelAPI_AttributeString::type());
data()->addAttribute(FeaturesPlugin_Group::LIST_ID(), ModelAPI_AttributeSelectionList::type());
}
void FeaturesPlugin_Group::execute()
{
- AttributeStringPtr aNameAttr = boost::dynamic_pointer_cast<ModelAPI_AttributeString>(
- data()->attribute(FeaturesPlugin_Group::NAME_ID()));
- if (!aNameAttr)
- return;
- std::string aName = aNameAttr->value();
- data()->setName(aName);
+ if (results().empty()) { // just create result if not exists
+ document()->createGroup(data());
+ }
}