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).
*** This bug has been marked as a duplicate of bug 405119 ***