<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi Denis,</p>
<p>But it is currently broken - right?</p>
<p>If I go to field calculator on a read only PG layer, I can only create "Virtual fields" no "Physical fields", because my layer is read only (this is expected). However, the checkbox to only update the "xx selected" features is activated by default and not greyed out. And I can toggle the Checkbox, although it has no effect and is misleading.</p>
<p>I just tested it in 3.4.x and 3.10.</p>
<p>I can open an issue on it.</p>
<p>Andreas</p>
<p><br /></p>
<p id="reply-intro">On 2019-11-27 08:35, Denis Rouzaud wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div id="replybody1">
<div>
<div dir="ltr">Hi Andreas,
<div> </div>
<div>It does sound like this is the current status today: the "update only..." checkbox is disabled if you create a virtual field.</div>
<div>It seems Matthias ;) coded it in 2014: <a href="https://github.com/qgis/QGIS/commit/68de043ecbcf0203b6a3667b488be71f479e5d91#diff-ff2f9c5bc35d79bfe1f0b7690bc60819R344" target="_blank" rel="noopener noreferrer">https://github.com/qgis/QGIS/commit/68de043ecbcf0203b6a3667b488be71f479e5d91#diff-ff2f9c5bc35d79bfe1f0b7690bc60819R344</a></div>
<div> </div>
<div>Cheers</div>
</div>
<br />
<div class="v1gmail_quote">
<div class="v1gmail_attr" dir="ltr">Le mer. 20 nov. 2019 à 13:12, Matthias Kuhn <<a href="mailto:matthias@opengis.ch" rel="noreferrer">matthias@opengis.ch</a>> a écrit :</div>
<blockquote class="v1gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid #cccccc; padding-left: 1ex;">
<div>
<p>Hi Andreas,</p>
<p>On first sight I'd also say that disabling the checkbox is the right thing to do.</p>
<p>For the other proposed behavior the requirements seem unclear (i.e. should the selection be preserved or the values changed when the selection changes), so we need a specific use case where this is required to take a decision.</p>
<p>Best regards</p>
<p>Matthias</p>
<div>On 11/20/19 11:27 AM, Andreas Neumann wrote:</div>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<p>Hi,</p>
<p>We came across an inconsistency in the field calculator:</p>
<p>One can select the checkbox "Only update xx selected features" in combination with creating a new virtual field. This is quite misleading for the user, as the result is that all features (not only the selected ones) are updated.</p>
<p>I see the following solutions:</p>
<p>- disable the checkbox "only update xx selected features" as soon as a the field is created as virtual (the easy fix)</p>
<p>- change the behavior of virtual fields in order to really allow update of selected features only. This would probably imply that we have to store the primary keys of the selected features somewhere and can lead to follow-up problems later on.</p>
<p>Any opinions on this?</p>
<p>Personally I would say that virtual fields cannot update "selected only features" and disable that checkbox as soon as virtual fields are created.</p>
<p>Andreas</p>
<br /><fieldset></fieldset>
<pre>_______________________________________________
QGIS-Developer mailing list
<a href="mailto:QGIS-Developer@lists.osgeo.org" rel="noreferrer">QGIS-Developer@lists.osgeo.org</a>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
</blockquote>
</div>
_______________________________________________<br />QGIS-Developer mailing list<br /><a href="mailto:QGIS-Developer@lists.osgeo.org" rel="noreferrer">QGIS-Developer@lists.osgeo.org</a><br />List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br />Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></blockquote>
</div>
</div>
</div>
<br />
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">_______________________________________________<br />QGIS-Developer mailing list<br /><a href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a><br />List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br />Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></div>
</blockquote>
<p><br /></p>

</body></html>