<div dir="ltr">Another interesting feature would be to have a context variable for the current type of edit form<div>see QgsAttributeEditorContext.Mode</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mar. 10 déc. 2019 à 13:39, Andreas Neumann <<a href="mailto:a.neumann@carto.net">a.neumann@carto.net</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-size:10pt;font-family:Verdana,Geneva,sans-serif">
<p>Hi,</p>
<p>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.</p>
<p>We already have the "layer_property" expression. It could either be extended with edit_state, or it could be a separate expression.</p>
<p>Good idea!</p>
<p>Andreas</p>
<p id="gmail-m_8815274425019773405reply-intro">On 2019-12-10 13:02, Pedro Venâncio wrote:</p>
<blockquote type="cite" style="padding:0px 0.4em;border-left:2px solid rgb(16,16,255);margin:0px">
<div id="gmail-m_8815274425019773405replybody1">
<div>
<div dir="ltr">
<div>Hi all,</div>
<div> </div>
<div>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.</div>
<div> </div>
<div>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])) :</div>
<div> </div>
<div>NOT( is_edition_active([layer=current layer]) )</div>
<div> </div>
<div> </div>
<div> </div>
<div>could hide the tab/container in edit mode, and show in "identify" mode.</div>
<div> </div>
<div>Could this expression be useful? If you think so, I will fill a feature request.</div>
<div> </div>
<div>Thank you very much!</div>
<div> </div>
<div>Best regards,</div>
<div>Pedro</div>
</div>
</div>
</div>
<br>
<div style="margin:0px;padding:0px;font-family:monospace">_______________________________________________<br>QGIS-Developer mailing list<br><a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noopener noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noopener noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></div>
</blockquote>
<p><br></p>

</div>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></blockquote></div>