+//********************************************************************
+bool ModuleBase_WidgetMultiSelector::processDelete()
+{
+ // find attribute indices to delete
+ std::set<int> anAttributeIds;
+ getSelectedAttributeIndices(anAttributeIds);
+
+ // refill attribute by the items which indices are not in the list of ids
+ bool aDone = false;
+ AttributePtr anAttribute = myFeature->data()->attribute(attributeID());
+ std::string aType = anAttribute->attributeType();
+ if (aType == ModelAPI_AttributeSelectionList::typeId()) {
+ AttributeSelectionListPtr aSelectionListAttr =
+ std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(anAttribute);
+ aDone = !anAttributeIds.empty();
+ aSelectionListAttr->remove(anAttributeIds);
+
+ }
+ else if (aType == ModelAPI_AttributeRefList::typeId()) {
+ AttributeRefListPtr aRefListAttr =
+ std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(anAttribute);
+ aDone = !anAttributeIds.empty();
+ aRefListAttr->remove(anAttributeIds);
+ }
+ if (aDone) {
+ // update object is necessary to flush update signal. It leads to objects references map update
+ // and the operation presentation will not contain deleted items visualized as parameters of
+ // the feature.
+ updateObject(myFeature);
+
+ restoreValue();
+ myWorkshop->setSelected(getAttributeSelection());
+ }
+ return aDone;
+}
+