[QGIS-Developer] random order after open attribute table

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

[QGIS-Developer] random order after open attribute table

Martin Landa
Hi,

I found problem with strange row ordering after opening attribute
table in QGIS3. Rows are not ordered correctly (how related features
were written to a layer). In example [1] rows should be ordered
staring with 0. I am getting correct order after pressing 'Reload the
table' [2]. Unfortunately adding code below after loading data in a
plugin

layer.dataProvider().forceReload()

has no effect, rows are still not ordered correctly. I didn't have
such problem with QGIS2, it's seems to be new behaviour. Any idea?

Related question: is it possible to defined for vector layer using
Python API specific field used for default row ordering when opening
attribute table?

Thanks, Martin

[1] http://geo102.fsv.cvut.cz/~landa/tmp/random_open_sorting.png
[2] http://geo102.fsv.cvut.cz/~landa/tmp/correct_order_after_reload.png

--
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa
_______________________________________________
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: random order after open attribute table

Andrea Giudiceandrea
Martin Landa wrote
> I found problem with strange row ordering after opening attribute
> table in QGIS3. Rows are not ordered correctly (how related features
> were written to a layer).

I can confirm the same strange annoying behaviour using the latest QGIS ltr
3.4.5-1 (89ee6f6e23) and QGIS master 3.7.0-6 (d890084f63) on Windows 7 64
bit testing vector data-sets in various formats (shapefile, gml, geojson,
gpkg, spatialite).
It doesn't happen with QGIS 2.18.23.


Martin Landa wrote
> I am getting correct order after pressing 'Reload the
> table'.

This works for me only for memory layers.

Andrea



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html
_______________________________________________
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: random order after open attribute table

Anita Graser


On Tue, Mar 12, 2019 at 10:36 PM andreaerdna <[hidden email]> wrote:
Martin Landa wrote
> I found problem with strange row ordering after opening attribute
> table in QGIS3. Rows are not ordered correctly (how related features
> were written to a layer).



_______________________________________________
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: random order after open attribute table

Andrea Giudiceandrea
Anita Graser wrote
> Could be https://issues.qgis.org/issues/19299

Thanks Anita,
it seems the same bug.

Regards.

Andrea



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html
_______________________________________________
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