Bug report #17005
spatial bookmarks can't be sorted
|Affected QGIS version:||master||Regression?:||Yes|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||Yes||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||24904|
The column sort indicator shows, but clicking on column headers does not actually sort. The indicator changes direction, but that is all that occurs.
Initially, the name column header shows ascending order, but the column isn't sorted.
This is a regression from 2.14; 2.18 does not sort either.
I am using OSGeo4W nightly build on Windows 8.1 64-bit system.
#6 Updated by Steven Mizuno almost 6 years ago
- Status changed from Closed to Reopened
- Affected QGIS version changed from 2.18.11 to master
Reopened because master (010cb1567b) still does not sort bookmarks.
I used Python Console to find the bookmarks list, on which isSortingEnabled() is false. Then using setSortingEnabled(True) does allow sorting.
2.18.15 does sort.
#8 Updated by Steven Mizuno almost 6 years ago
Thanks for the attention, I will test as soon as I can.
Two minor things have occurred to me.
1. The sorting probably should be case insensitive. I believe most users would appreciate this.
2. The SRID column more properly should be CRS or possibly Projection, in keeping with usage elsewhere.
Please see #17674 export/import issues
#9 Updated by Steven Mizuno almost 6 years ago
Alessandro,I have tested the Spatial Bookmarks fixes in master (ea49c8276c latest rev. I tried) and believe they are working correctly.
- creating bookmarks
- moving bookmarks to/from project, including saving/loading project
- importing, including starting with no bookmarks
- sorting various columns
- editing bookmarks (SRID can't be edited with the current implementation)
I have also tested internationalization, which hasn't been mentioned as a problem, but I did think to test -- this is OK.
I used Python Console to update a bookmark's extent, by finding the lstBookmarks object and setting the x..., y... values and the srid value, too.
I would very much appreciate the two items in my previous comment being implemented. I have tried
setSortCaseSensitivity( Qt::CaseInsensitive ) in the QgsBookmarksProxyModel constructor to get case insensitive sorting to work.
One last very minor problem: the title of the Spatial Bookmarks Panel somehow acquired an ampersand in one of the commits. It shows as "Sp&atial"... -- qgsbookmarksbase.ui is the affected file.
Thank you very much.