*/
void ExchangePlugin_ImportFeature::initAttributes()
{
- data()->addAttribute(ExchangePlugin_ImportFeature::FILE_PATH_ID(), ModelAPI_AttributeString::typeId());
- AttributePtr aFeaturesAttribute = data()->addAttribute(ExchangePlugin_ImportFeature::FEATURES_ID(), ModelAPI_AttributeRefList::typeId());
+ data()->addAttribute(ExchangePlugin_ImportFeature::FILE_PATH_ID(),
+ ModelAPI_AttributeString::typeId());
+ AttributePtr aFeaturesAttribute =
+ data()->addAttribute(ExchangePlugin_ImportFeature::FEATURES_ID(),
+ ModelAPI_AttributeRefList::typeId());
aFeaturesAttribute->setIsArgument(false);
ModelAPI_Session::get()->validators()->registerNotObligatory(
aSelectionList->value(anElementIndex)->setId(aReferenceID);
}
}
+ // Top avoid problems in Object Browser update: issue #1647.
+ ModelAPI_EventCreator::get()->sendReordered(
+ std::dynamic_pointer_cast<ModelAPI_Feature>(aRefListOfGroups->owner()));
} catch (XAO::XAO_Exception& e) {
std::string anError = e.what();
if (!data()->isValid())
return;
AttributeRefListPtr aList = reflist(FEATURES_ID());
- // if the object is last, remove it from the list (needed to skip empty transaction on edit of sketch feature)
- if (aList->object(aList->size(true) - 1, true) == theFeature) {
- aList->remove(theFeature);
- } else {
- // to keep the persistent sub-elements indexing, do not remove elements from list,
- // but substitute by nulls
- aList->substitute(theFeature, ObjectPtr());
- }
+ aList->remove(theFeature);
}
int ExchangePlugin_ImportFeature::numberOfSubs(bool forTree) const
{
- return data()->reflist(FEATURES_ID())->size(false);
+ return data()->reflist(FEATURES_ID())->size(true);
}
std::shared_ptr<ModelAPI_Feature> ExchangePlugin_ImportFeature::subFeature(