Bug 498479

Summary: Layer inserted in reverse, after drag&drop a Krita file on canvas then Insert as New Layer
Product: [Applications] krita Reporter: David REVOY <info>
Component: Layer StackAssignee: Krita Bugs <krita-bugs-null>
Status: CONFIRMED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.2.6   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description David REVOY 2025-01-10 16:23:47 UTC
Hi,

To reproduce:
1. Get a multilayered Krita kra file ( eg. https://www.peppercarrot.com/en/viewer/misc__2022-08-15_kiki-repairing_by-David-Revoy.html , it has three layers, link to the zip containing the kra in the footer).
2. Open in Krita a new document
3. Drag and Drop from your file explorer the Kra file on your canvas
4. At the contextual menu appearing, select "Insert as New Layer"

Result:
The content of the Kra files, its layers, are inserted on the stack but in reversed order: the bottom one will appear on the top, the top one on the bottom. It breaks the rendering. 

Expected: 
The layers to be inserted in the correct order.

Observation:
- It affects also 5.2.5, 5.2.3 but not 5.2.2 and before (tested via appimage thanks to https://download.kde.org/Attic/krita/ )
- I would appreciate (if possible/"low hanging fruit") to import the layers bundled inside a group (named after the filename). That would help at keeping the layer stack organized.

Krita 5.2.6 (git 4c99cc9a) appimage
KDE Plasma Debian 12 bookworm
Comment 1 David REVOY 2025-02-20 17:43:26 UTC
Also, it affects .ora too.
Still reproducible in 5.2.9 (git ac6cae8).
Comment 2 Vitamorus 2025-09-20 14:24:39 UTC
I can reproduce this, so I'm setting it as confirmed.