Feature request #6828

Correct sorting of layers in TOC when loading multiple layers

Added by Ryan Dalton almost 12 years ago. Updated over 7 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:GUI
Pull Request or Patch supplied:No Resolution:fixed/implemented
Easy fix?:No Copied to github as #:15970

Description

When multiple layers are added into QGIS from a PostGIS DB (via the "Add PostGIS Layers" button), they are added to the Table of Contents in reverse alphabetical order. I would anticipate one of two alternatives:

1) add the data layers to the TOC alphabetically, or
2) more favorably, the layers would be added to the TOC by data type in the logical order they would be visible to the user (points on top, then lines, polygons, and finally rasters at the bottom). For layers of the same geometries, they would be sorted first by geometry, then alphabetically.

See discussion at http://gis.stackexchange.com/questions/41977/sort-layers-in-qgis-table-of-contents


Related issues

Duplicated by QGIS Application - Feature request #17326: Sorting of Layers Closed 2017-10-25

History

#1 Updated by Bruce Steedman almost 9 years ago

This FR has been outstanding some years now and I'd have thought it was the very definition of a low effort high impact job - one or two lines of code surely. In addition to the referenced gis.stackexchange Q&A there is another one: http://gis.stackexchange.com/questions/88738/is-there-a-simple-way-to-sort-layers-alphabetically-in-qgis. With the two having a total of 20 up votes can this FR be moved up the priority list?

Thanks

#2 Updated by Giovanni Manghi almost 9 years ago

Bruce Steedman wrote:

This FR has been outstanding some years now and I'd have thought it was the very definition of a low effort high impact job - one or two lines of code surely. In addition to the referenced gis.stackexchange Q&A there is another one: http://gis.stackexchange.com/questions/88738/is-there-a-simple-way-to-sort-layers-alphabetically-in-qgis. With the two having a total of 20 up votes can this FR be moved up the priority list?

Thanks

that would be useful also for me, but don't forget that qgis development is heavily user-driven, so after this seems not a so popular request, otherwise someone would have already contributed code or funds to have it added.

#3 Updated by Philipp Ringli almost 9 years ago

It has my vote!

#4 Updated by Giovanni Manghi over 7 years ago

  • Easy fix? set to No

#5 Updated by Arnaud Morvan over 7 years ago

  • Description updated (diff)

With https://github.com/qgis/QGIS/pull/4965 layers are now inserted in layer tree alphabetically (reverse than before).

#6 Updated by Giovanni Manghi over 7 years ago

  • Status changed from Open to Closed
  • Resolution set to fixed/implemented

#7 Updated by Jürgen Fischer about 7 years ago

Also available in: Atom PDF