I have a layer where features are selected by location in relation to one or more other layers (selection_type is ADD_SELECTION) in a loop. After that, zero, one, some or all features are selected.
I want to delete only the selected features - if there are some.
But the "Delete Features"-Tool deletes either the selected features, or - if none are selected - all of them. How can I check, if there are any features selected? The "Get Count"-Tool works just like the "Delete Features"-Tool,
E.g. Layer X has a total of 100 features:
- No features are selected, "Get Count" returns 100
- All features are selected, "Get Count" returns 100
I would like to delete only the selected features. If there are none, I don't want to delete anything.