+ if (theID == VERTEX_CHOICE_ID() ||
+ theID == EDGE_CHOICE_ID() ||
+ theID == FACE_CHOICE_ID()) {
+ std::string aListAttrId = theID == VERTEX_CHOICE_ID() ? VERTEX_LIST_ID() : (
+ theID == EDGE_CHOICE_ID() ? EDGE_LIST_ID() :
+ FACE_LIST_ID());
+
+ AttributeBooleanPtr aChoiceAttribute = std::dynamic_pointer_cast<ModelAPI_AttributeBoolean>(
+ data()->attribute(theID));
+ if (!aChoiceAttribute->value()) {
+ AttributeSelectionListPtr aListAttribute =
+ std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(data()->attribute(aListAttrId));
+ aListAttribute->clear();
+ }
+ }
+ else if (theID == VERTEX_LIST_ID() ||
+ theID == EDGE_LIST_ID() ||
+ theID == FACE_LIST_ID()) {
+ AttributeSelectionListPtr aSelectionListAttr =
+ std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(data()->attribute(theID));
+ for (int i = 0, aSize = aSelectionListAttr->size(); i < aSize; i++) {
+ AttributeSelectionPtr aSelectAttr = aSelectionListAttr->value(i);
+ ObjectPtr anObject = aSelectAttr->context();
+ if (!anObject.get())
+ continue;
+ else {
+ FeaturePtr aFeature = ModelAPI_Feature::feature(anObject);
+ }
+ }
+ }