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

Andreas Neumann a.neumann at carto.net
Tue Dec 10 04:39:27 PST 2019


Hi, 

I agree, it would be a useful. Not only for forms, but also for
symbology and labeling. One could switch symbology from something
complex to simple during edition and then back to the complicated
symbology. Or hide/change labels. 

We already have the "layer_property" expression. It could either be
extended with edit_state, or it could be a separate expression. 

Good idea! 

Andreas 

On 2019-12-10 13:02, Pedro VenĂ¢ncio wrote:

> 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 
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20191210/d37f614f/attachment-0001.html>


More information about the QGIS-Developer mailing list