Bug report #16917
Vector layer dialog orders numeric columns alphabetically, not numerically
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | GUI | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 24816 |
Description
If you open a vector file with multiple layers you get the "Select vector layers to add..." dialog.
That dialog includes a column "Number of features" with counts of the features per layer.
If you sort that column, it will be sorted alphabetically (1, 10, 100, 2, 3) but it should be sorted numerically. See the attached screenshot.
The same applies to the Layer ID column.
Confirmed by duiv in master, I am on 2.18.
You can use the attached sample gpkg to reproduce.
Source for the sample data was http://suche.transparenz.hamburg.de/dataset/alkis-verwaltungsgrenzen-hamburg7
License of the sample data: Datenlizenz Deutschland Namensnennung 2.0 (Freie und Hansestadt Hamburg, Landesbetrieb Geoinformation und Vermessung)
Associated revisions
sub layer dialog: sort by layer id and feature count numerically (fixes #16917)
History
#1 Updated by Richard Duivenvoorde over 7 years ago
confirmed in master with both attached datasets
#2 Updated by Jürgen Fischer over 7 years ago
- % Done changed from 0 to 100
- Status changed from Open to Closed
Applied in changeset qgis|90fa6c2e9124b555428ab083bf936d28b043539f.