Bug report #4110

order of layers changes when they are added to a group

Added by Alister Hood over 8 years ago. Updated over 4 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 over 4 years ago

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

Revision b64ebfb2
Added by Nathan Woodrow over 4 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 over 8 years ago

  • Target version set to Version 1.7.4

#2 Updated by Paolo Cavallini almost 8 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 over 7 years ago

  • Target version changed from Version 1.8.0 to Version 2.0.0

#4 Updated by Jürgen Fischer almost 6 years ago

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

#5 Updated by Médéric RIBREUX over 4 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 over 4 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 over 4 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF