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

Matthias Kuhn matthias at opengis.ch
Wed Nov 20 04:11:57 PST 2019


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 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/20191120/cb108a8a/attachment.html>


More information about the QGIS-Developer mailing list