[QGIS-Developer] QGIS field calculator: issue with updating selected only features in combination with virtual field

Denis Rouzaud denis.rouzaud at gmail.com
Tue Nov 26 23:35:02 PST 2019


Hi Andreas,

It does sound like this is the current status today: the "update only..."
checkbox is disabled if you create a virtual field.
It seems Matthias ;) coded it in 2014:
https://github.com/qgis/QGIS/commit/68de043ecbcf0203b6a3667b488be71f479e5d91#diff-ff2f9c5bc35d79bfe1f0b7690bc60819R344

Cheers

Le mer. 20 nov. 2019 à 13:12, Matthias Kuhn <matthias at opengis.ch> a écrit :

> Hi Andreas,
>
> On first sight I'd also say that disabling the checkbox is the right thing
> to do.
>
> 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.
>
> Best regards
>
> Matthias
> On 11/20/19 11:27 AM, Andreas Neumann wrote:
>
> Hi,
>
> We came across an inconsistency in the field calculator:
>
> 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.
>
> I see the following solutions:
>
> - disable the checkbox "only update xx selected features" as soon as a the
> field is created as virtual (the easy fix)
>
> - 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.
>
> Any opinions on this?
>
> Personally I would say that virtual fields cannot update "selected only
> features" and disable that checkbox as soon as virtual fields are created.
>
> Andreas
>
> _______________________________________________
> QGIS-Developer mailing listQGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
> _______________________________________________
> 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/20191127/272e297f/attachment.html>


More information about the QGIS-Developer mailing list