std::string& theError) const
{
FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(theAttribute->owner());
- AttributeSelectionListPtr aSelAttr =
- std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(theAttribute);
+ AttributeRefListPtr aSelAttr =
+ std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(theAttribute);
if (!aSelAttr)
return false;
std::list<ObjectPtr> aMirroredObjects = aRefListOfMirrored->list();
for(int anInd = 0; anInd < aSelAttr->size(); anInd++) {
- std::shared_ptr<ModelAPI_AttributeSelection> aSelect = aSelAttr->value(anInd);
+ ObjectPtr aSelObject = aSelAttr->object(anInd);
std::list<ObjectPtr>::iterator aMirIter = aMirroredObjects.begin();
for (; aMirIter != aMirroredObjects.end(); aMirIter++)
- if (aSelect->context() == *aMirIter)
+ if (aSelObject == *aMirIter)
return false;
}
return true;
std::string& theError) const
{
FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(theAttribute->owner());
- AttributeSelectionListPtr aSelAttr =
- std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(theAttribute);
+ AttributeRefListPtr aSelAttr =
+ std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(theAttribute);
if (!aSelAttr)
return false;
std::list<ObjectPtr>::iterator anObjIter;
for(int anInd = 0; anInd < aSelAttr->size(); anInd++) {
- std::shared_ptr<ModelAPI_AttributeSelection> aSelect = aSelAttr->value(anInd);
+ ObjectPtr aSelObject = aSelAttr->object(anInd);
anObjIter = anInitialObjects.begin();
for (; anObjIter != anInitialObjects.end(); anObjIter++)
- if (aSelect->context() == *anObjIter)
+ if (aSelObject == *anObjIter)
break;
if (anObjIter != anInitialObjects.end())
continue;
anObjIter = aCopiedObjects.begin();
for (; anObjIter != aCopiedObjects.end(); anObjIter++)
- if (aSelect->context() == *anObjIter)
+ if (aSelObject == *anObjIter)
return false;
}
return true;