Matthias Kuhn 01f3c9ae38 [FEATURE] Add is_selected and num_selected functions
* is_selected() returns if the current feature is selected
* num_selected() returns the number of selected features on the current layer
* is_selected(layer, feature) returns if the "feature" is selected. "feature"
  must be on "layer".
* num_selected(layer) returns the number of selected features on "layer"
2016-10-27 17:24:15 +02:00

14 lines
651 B
Plaintext

{
"name": "is_selected",
"type": "function",
"description": "Returns if a feature is selected. If called with no parameters checks the current feature.",
"arguments": [
{"arg":"feature","description":"The feature which should be checked for selection"},
{"arg":"layer","description":"The layer (or its id or name) on which the selection will be checked"}
],
"examples": [
{ "expression":"is_selected()", "returns" : "True if the current feature is selected."},
{ "expression":"is_selected(get_feature('streets', 'name', \"street_name\"), 'streets')", "returns":"True if the current building's street is selected."}
]
}