Bug report #4110

order of layers changes when they are added to a group

Added by Alister Hood over 13 years ago. Updated almost 9 years ago.

Status:Closed
Priority:Low
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 #:14092

Description

Open a project, create a new group, select some layers and drag them into the group. The order of the layers will change (if it does not, maybe try it again after changing the order of the layers).
It would be nice if the order stayed the same.

Associated revisions

Revision afef14bf
Added by Sebastian Dietrich almost 9 years ago

sort the indexes when generating layer tree mime data (fixes #4110)

Revision b64ebfb2
Added by Nathan Woodrow almost 9 years ago

Merge pull request #2543 from SebDieBln/SortLayerTreeMimedata

Sort the indexes when generating layer tree mime data (fixes #4110)

History

#1 Updated by Giovanni Manghi almost 13 years ago

  • Target version set to Version 1.7.4

#2 Updated by Paolo Cavallini over 12 years ago

  • Crashes QGIS or corrupts data set to No
  • Target version changed from Version 1.7.4 to Version 1.8.0
  • Affected QGIS version set to master

#3 Updated by Paolo Cavallini about 12 years ago

  • Target version changed from Version 1.8.0 to Version 2.0.0

#4 Updated by Jürgen Fischer over 10 years ago

  • Target version changed from Version 2.0.0 to Future Release - Lower Priority

#5 Updated by Médéric RIBREUX almost 9 years ago

Hello, bug triage...

in QGIS 2.13 master, the layers are added in the selection order if you have used Ctrl + Mouse click to select the layers.
They are added on the first order when selected with Shift + Mouse click.

So, if you have selected two layers in a reverse order with Ctrl, the layers will be added in this reverse order in the group.

We need to fix this behavior: Ctrl selection should preserve the layer order.

#6 Updated by Sebastian Dietrich almost 9 years ago

See PR 2543 for a solution.

Note that the unintended reordering also happens when
  • moving layers out of a group
  • moving layers within the layer tree
  • exporting layers to a qlr-file

All of these are fixed by the mentioned PR.

#7 Updated by Nathan Woodrow almost 9 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF