Bug 352503

Summary: Merging group then canceling expands group
Product: [Applications] krita Reporter: sqdqsddd
Component: Layer StackAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: halla
Priority: NOR    
Version First Reported In: 2.9.7   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description sqdqsddd 2015-09-09 22:56:18 UTC
I work with groups a lot. when I merge the group into a single layer, then realize I did a mistake and press ctrl z to cancel it, the group appears as expanded regardless of whether it was minimized or not before merging. All groups inside that group will also be expanded.

Reproducible: Always

Steps to Reproduce:
1.create a series of cascading groups (or even a single group)
2.merge group
3.cancel it (ctrl+z or edit/undo)

Actual Results:  
group (and subgroup inside that group) all appear as expended.

Expected Results:  
groups (and subgroups inside that group) should appear expanded or minimized depending on whether they were expanded or minimized before being merged.
Comment 1 sqdqsddd 2015-09-09 23:06:40 UTC
I forgot to mention that if you have another group outside of the group you just merged (so you have group 1 that you want to merge, and group 2), then after canceling the merge, both group 1 and group 2 and all subgroups inside both groups will be expanded).
Comment 2 Halla Rempt 2015-09-12 08:28:18 UTC
Hi,

Thanks for your report. I can confirm the issue -- but I'm not sure how fixable it is. The problem is that the collapsed state of a group isn't stored in the group layer, but in the layerbox itself. That's why you can have a group collapsed in one view, and open in another view.
Comment 3 Halla Rempt 2018-11-30 13:02:25 UTC
This is actually not true anymore: now groups expand automatically when switching between views on the same image.
Comment 4 Halla Rempt 2018-11-30 13:19:10 UTC
Git commit 37c4f13a75bc4a5aea2fd462b8df8903f9ebe9d1 by Boudewijn Rempt.
Committed on 30/11/2018 at 13:17.
Pushed by rempt into branch 'master'.

Make the layerbox reflect the collapsed state of the nodes

The prevents Krita from opening groups when switching between
different views on one image, for instance.

M  +1    -1    plugins/dockers/defaultdockers/kis_layer_box.cpp

https://commits.kde.org/krita/37c4f13a75bc4a5aea2fd462b8df8903f9ebe9d1