<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<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<br>
</p>
<div class="moz-cite-prefix">On 11/20/19 11:27 AM, Andreas Neumann
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:fc7a44a0c88a0ab18ce58c9ac0435610@carto.net">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<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 class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
QGIS-Developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
</blockquote>
</body>
</html>