[QGIS-Developer] $geometry does not consider changes in the edit uffer

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[QGIS-Developer] $geometry does not consider changes in the edit uffer

3nids
Hi all,

If I set a virtual field with the vertex count (i.e. num_points(  $geometry ) ), it does not consider changes in the edit buffer.
In other words, I have to commit the changes so the expression is correct.

Is this an expected behavior?
I would have expect to be updated directly.

Cheers,

Denis

_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: $geometry does not consider changes in the edit uffer

3nids
Hi again,

I'd like to bump this issue once more to the list....

Anyone knows about?

Cheers,
Denis

Le jeu. 1 mars 2018 à 13:14, Denis Rouzaud <[hidden email]> a écrit :
Hi all,

If I set a virtual field with the vertex count (i.e. num_points(  $geometry ) ), it does not consider changes in the edit buffer.
In other words, I have to commit the changes so the expression is correct.

Is this an expected behavior?
I would have expect to be updated directly.

Cheers,

Denis

_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: $geometry does not consider changes in the edit uffer

Nyall Dawson
On 14 March 2018 at 03:19, Denis Rouzaud <[hidden email]> wrote:
> Hi again,
>
> I'd like to bump this issue once more to the list....

>>
>> If I set a virtual field with the vertex count (i.e. num_points(
>> $geometry ) ), it does not consider changes in the edit buffer.
>> In other words, I have to commit the changes so the expression is correct.
>>
>> Is this an expected behavior?
>> I would have expect to be updated directly.

I can't reproduce -- it works fine here (testing through the attribute table).

Nyall
_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: $geometry does not consider changes in the edit uffer

3nids
Hi Nyall,

Thanks for testing.

I tried again and still observe the issue.
I have found worst issues with setting this virtual fields with expression "num_points( $geometry )"

- when adding a new feature and committing I get an error saying:
Feature has too many attributes (expecting 1, received 2) 
although feature is correctly written to the provider

- the function seems to return actually 1 vertex more than there actually is in the geometry

- I do need to commit to get the changes

I tested both with geopkg and shapefiles.
And I did not started alcohol yet today.

Cheers,
Denis




Le mar. 13 mars 2018 à 16:47, Nyall Dawson <[hidden email]> a écrit :
On 14 March 2018 at 03:19, Denis Rouzaud <[hidden email]> wrote:
> Hi again,
>
> I'd like to bump this issue once more to the list....

>>
>> If I set a virtual field with the vertex count (i.e. num_points(
>> $geometry ) ), it does not consider changes in the edit buffer.
>> In other words, I have to commit the changes so the expression is correct.
>>
>> Is this an expected behavior?
>> I would have expect to be updated directly.

I can't reproduce -- it works fine here (testing through the attribute table).

Nyall

_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer