[QGIS-Developer] Expression to check if a layer is in edit mode

Pedro VenĂ¢ncio pedrongvenancio at gmail.com
Tue Dec 10 04:02:26 PST 2019


Hi all,

I was thinking that it would be very useful to have an expression to check
if one layer, or at least, the current layer, is in edit mode.

One use case I'm seeing is: imagine that you have a form tab or group
container, and you want to hide that tab or container just when the layer
is in editing mode. If this option was available, simply using the control
visibility by expression with something like (with a behaviour similar to
is_selected([feature=current feature][,layer=current layer])) :

NOT( is_edition_active([layer=current layer]) )

could hide the tab/container in edit mode, and show in "identify" mode.

Could this expression be useful? If you think so, I will fill a feature
request.

Thank you very much!

Best regards,
Pedro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20191210/4e829f09/attachment.html>


More information about the QGIS-Developer mailing list