#981 closed defect (fixed)
Attribute Table sorting not working as expected
Reported by: | smizuno | Owned by: | mhugent |
---|---|---|---|
Priority: | major: does not work as expected | Milestone: | |
Component: | GUI | Version: | Trunk |
Keywords: | table sort | Cc: | |
Must Fix for Release: | Yes | Platform: | All |
Platform Version: | Awaiting user input: | no |
Description
Clicking on column headers does not sort properly unless
- character type columns have no blanks, or
- number type columns are strictly numeric digits and the negative sign (no scientific notation or NAN) Note that currently null values are shown as 0, at least on PostGIS data.
It usually takes several clicks on the header to show the problem.
Change History (4)
comment:1 by , 16 years ago
comment:3 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Testing with r9954
For number types, I have tried a mix of standard numeric notation and scientific notation and find that the sorting is correct, as long as there aren't the special values (like NaN, Infinity - note that infinity doesn't show in the attribute table view). Null cells sort at top or bottom depending on sort direction.
I believe that the special values are not very likely to be seen in the GIS world, so I won't pursue this any farther.
I can't be sure how text columns sort on null values (blank cells) as the word NULL is filled in for null data, so all cells have text in them. Therefore they sort properly.
Since numbers now sort properly, I consider this closed.
Thank you.
It is the default Qt sorting, no idea how to change it.