Bug 404200

Summary: Error flattening image when the active layer is in a group [4.2.0-pre-alpha (git d556b73)]
Product: [Applications] krita Reporter: Regis <regis>
Component: Layer StackAssignee: Tiar <tamtamy.tymona>
Status: RESOLVED DUPLICATE    
Severity: normal CC: halla, tamtamy.tymona
Priority: NOR    
Version: nightly build (please specify the git hash!)   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Attachments: Kra file showing the issue when flattening

Description Regis 2019-02-11 13:53:44 UTC
Created attachment 117981 [details]
Kra file showing the issue when flattening

SUMMARY
When flattening a file (to prepare a drawing for print, for example), there's an issue if the active layer is inside a group of layers.

STEPS TO REPRODUCE
1. Create a file with multiple layers.
2. Put at least one of its layers inside a group.
3. With this grouped layer selected, press "layers->flatten image" to flatten the whole image.

OBSERVED RESULT
In the document window, it's like a part of the image is missing (the size of the missing or erased part depends on the image resolution - the bigger the image the more will remain visible), and the layer docker shows no layer at all.
If you save this file, it will load as an empty file no matter how much of it was still visible before the save (it will show no layer and it won't let you create one).


SOFTWARE/OS VERSIONS
Windows 10
Krita version: 4.2.0-pre-alpha (git 75dfb78)
Qt:
Version (compiled): 5.9.3
Version (loaded): 5.9.3

I'm attaching the file I created to test this. Just make sure select "Layer 2" before flattening to see the result (if any other layer is selected, or the group itself, it will work as expected).
Comment 1 Halla Rempt 2019-03-06 10:57:21 UTC

*** This bug has been marked as a duplicate of bug 405119 ***