qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.51k stars 2.99k forks source link

Project ignores expanded group status #44543

Open meyerlor opened 3 years ago

meyerlor commented 3 years ago

What is the bug or the crash?

I have ordered layeres in the layer control panel in different groups. I want to save the project with certain groups in expanded and other in collapsed state: grafik

when i load the project after saving, one group ("Sonstiges") is always expanded - i even tried editing the .qgs and set <layer-tree-group name="Sonstiges" expanded="0" checked="Qt::Checked"> but to no avail - the group is still expanded when i load the project. grafik

Steps to reproduce the issue

  1. Edit project, put layers in different groups, set expanded state of groups
  2. Save Project as -> .qgz or .qgs, makes no difference
  3. Close QGIS
  4. Open QGIS, drag & drop poject file into QGIS instance
  5. Groups which were collapsed are expanded again

Versions

QGIS 3.16.9 and 3.20.1 are affected, previous versions i do not know

Additional context

No response

gioman commented 3 years ago

Can you attach the project?

meyerlor commented 3 years ago

yes, without the data though but there it also shows the same behaviour Example_Project.zip

Glurback commented 3 years ago

Hi all,

I do have the very same issue of Qgis project not registering properly groups settings when closing. Tried the very same solution changing manually the tags expanded="1" into expanded="0" in the .qgs file, but the issue comes back when reopening project.

Tested in QGIS 3.10 and 3.16

Would anybody have a clue on how to fix this?

Cheers

GBK

alexbruy commented 1 year ago

Possibly related issue #30971.