[QGIS-Developer] is_layer_active expression

Nyall Dawson nyall.dawson at gmail.com
Mon Sep 24 23:37:38 PDT 2018


On Mon, 24 Sep 2018 at 19:20, Otto Dassau <dassau at gbd-consult.de> wrote:
>
> Dear Devs,
>
> in QGIS 3 I found the expression "is_layer_active" within the copyright
> decoration very useful. I would like to use this expression also within the
> print composer, but it seems to be not available there.

Confirmed -- fix incoming!

> Is this correct, are expressions not available all over QGIS within the
> expression builder?

Some expression functions/variables are "context dependent". E.g.
is_layer_visible doesn't make any sense in expressions which aren't
directly associated with a map. So the function won't be available as
for expressions used as a field default value, or for a layout text
label (since the layout may have multiple maps, each with a different
layer set, and a label isn't linked to any map item in particular!).

> And how can I get this expression working for the print composer as well?

Wait for 3.4 ;)

Nyall


More information about the QGIS-Developer mailing list