<div dir="ltr">Hi Andreas,<div><br></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">https://github.com/qgis/QGIS/commit/68de043ecbcf0203b6a3667b488be71f479e5d91#diff-ff2f9c5bc35d79bfe1f0b7690bc60819R344</a></div><div><br></div><div>Cheers</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 20 nov. 2019 à 13:12, Matthias Kuhn <<a href="mailto:matthias@opengis.ch">matthias@opengis.ch</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>
    <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>On 11/20/19 11:27 AM, Andreas Neumann
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <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" target="_blank">QGIS-Developer@lists.osgeo.org</a>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">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" 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>