[Qgis-developer] Integrate isselected() expression in core?
Matthias Kuhn
matthias at opengis.ch
Mon Sep 26 10:12:29 PDT 2016
Hi Andreas
On 26/09/16 16:01, Neumann, Andreas wrote:
>
> Hi,
>
> I recently had the need to filter a layer based on a selection, e.g.
> for QGIS atlas. The expressions plus plugin provides the
> "isselected(layername)" function which returns true|false for each
> feature - based on the selection state.
>
> Could we make this a core expression in QGIS without the need to
> install a plugin? I guess this expression is of quite common use for many.
>
At the time I implemented this there were no expression variables
available and an "expression context" barely existed and therefore a
proper solution was out of scope, so it was more suitable to ship it
with a plugin than in core.
With the current state of expressions it should not be hard to implement
it in a clean way.
Proposal:
isselected(feature, layer_id) <-- explicitly check for a certain feature
on a certain layer
isselected(feature_id, layer_id) <-- explicitly check for a certain
feature on a certain layer
isselected() <-- shorthand for the current feature / layer from the
expression context.
Best regards
Matthias
More information about the Qgis-developer
mailing list