std::list<std::string>::iterator it = aLtAttributes.begin();
for (; it != aLtAttributes.end(); it++) {
AttributePtr anAttr = aData->attribute(*it);
- if (!anAttr->isInitialized()) {
+ if (!anAttr->isInitialized()) { // attribute is not initialized
std::map<std::string, std::set<std::string> >::const_iterator aFeatureFind =
myNotObligatory.find(theFeature->getKind());
- if (aFeatureFind == myNotObligatory.end() ||
+ if (aFeatureFind == myNotObligatory.end() || // and it is obligatory for filling
aFeatureFind->second.find(*it) == aFeatureFind->second.end()) {
return false;
}
std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(aAttr);
if (aSelectAttr)
aSelectAttr->setValue(aBody, myShape);
+ else {
+ AttributeRefAttrPtr aRefAttr = aData->refattr(attributeID());
+ if (aRefAttr)
+ aRefAttr->setObject(mySelectedObject);
+ }
updateObject(myFeature);
return true;
}