Bug report #12733

Layer order list corrupted if a layer reference can't be resolved

Added by Andreas Neumann over 9 years ago. Updated over 9 years ago.

Status:Closed
Priority:Normal
Assignee:Jürgen Fischer
Category:Project Loading/Saving
Affected QGIS version:2.8.1 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:20833

Description

If a project has a layer order that overrides the default rendering order and a layer reference can't be resolved during project load (e.g. due to a missing file) then the layer is removed, but leaves the layer order list in a corrupted state.

It looks like the list indexes are corrupted due to the reduced number of layers which are not taken into account.

One can test this through constructing a new project with a couple of layers, overriding the default layer order and then adding a raster layer in between. Then the project should be saved and the raster layer moved to a different name. Finally the project should be reloaded and you can see the corrupted layer order list.

Associated revisions

Revision 78c60a29
Added by Jürgen Fischer over 9 years ago

handle bad layers when custom layer order is set (fixes #12733)

Revision 99df33fb
Added by Jürgen Fischer over 9 years ago

handle bad layers when custom layer order is set (fixes #12733)

(cherry picked from commit 78c60a297c64f87b2c7fd15801a3c62d8af92cb0)

History

#1 Updated by Jürgen Fischer over 9 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF