[QGIS-Developer] QGIS field calculator: issue with updating selected only features in combination with virtual field
Andreas Neumann
a.neumann at carto.net
Wed Nov 27 02:34:56 PST 2019
Hi Denis,
But it is currently broken - right?
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.
I just tested it in 3.4.x and 3.10.
I can open an issue on it.
Andreas
On 2019-11-27 08:35, Denis Rouzaud wrote:
> 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 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
> _______________________________________________
> 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
_______________________________________________
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/b66b1d54/attachment-0001.html>
More information about the QGIS-Developer
mailing list