- if (aRefAttr) {
- ObjectPtr aObject = aRefAttr->object();
- if (!(aObject && aObject->isSame(theSelectedObject))) {
- aRefAttr->setObject(theSelectedObject);
- }
- } else {
- AttributeSelectionPtr aSelectAttr = aData->selection(attributeID());
- ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(theSelectedObject);
- if (aSelectAttr.get() != NULL) {
- aSelectAttr->setValue(aResult, theShape);
- }
+ ObjectPtr aObject = aRefAttr->object();
+ if (!(aObject && aObject->isSame(theSelectedObject))) {
+ aRefAttr->setObject(theSelectedObject);
+ }
+ } else if (aType == ModelAPI_AttributeSelection::typeId()) {
+ AttributeSelectionPtr aSelectAttr = aData->selection(attributeID());
+ ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(theSelectedObject);
+ if (aSelectAttr.get() != NULL) {
+ aSelectAttr->setValue(aResult, theShape);