https://bugs.kde.org/show_bug.cgi?id=475860
Bug ID: 475860 Summary: Quick-ungrouping a group with a mask may lead to data loss Classification: Applications Product: krita Version: 5.2.0 Platform: Ubuntu OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: Layer Stack Assignee: krita-bugs-n...@kde.org Reporter: paleh21...@proton.me Target Milestone: --- SUMMARY When ungrouping a group containing any mask (except a selection mask) the layers located below the mask are correctly ungrouped, whereas the mask and the all layers above are deleted. Undoing this operation doesn't bring the mask back, leading to a potential data loss. STEPS TO REPRODUCE 1. Create a group with at least one layer 2. Create a mask (e.g. a transparency mask) inside the group, and place it below a layer. The mask should be applied to the group itself, not the layer. 3. Execute some operations on the mask (e.g. draw some strokes if it's a transparency) 4. Right click the group layer and do Group->Quick Ungroup 5. Press undo. 6. Press undo. OBSERVED RESULT After step 4, the layers above the mask have disappeared. After step 5, the group is back, but it no longer contains the mask. After step 6, which should undo the last operation done in step 3, nothing happens, as there is no mask to apply the change to. If the user can undo until step 1, then pressing "redo" enough times will bring the mask and all the work back. However if the undo stack has been exceeded, all the work done in step 3 will be lost. EXPECTED RESULT When ungrouping, layers above the mask should not get lost. Masks should be at least recoverable through undo and, ideally, available after the ungrouping. For example filter and transparency mask could get converted to filter and transparency layers (maybe this should happen whenever a mask is created/dragged inside a group layer?). Alternatively, ungrouping could just push the regular layers outside the group while keeping the group layer as the container for the masks, if they are present. SOFTWARE/OS VERSIONS Linux: Ubuntu 22.04 Qt Version: 5.15.7 ADDITIONAL INFORMATION also present in 5.1.5 -- You are receiving this mail because: You are watching all bug changes.