Bug 446223

Summary: Can't Paste a Clone Layer
Product: [Applications] krita Reporter: Leonardo <odraencoded>
Component: Layer StackAssignee: Krita Bugs <krita-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: ahab.greybeard, rojasreinold, vitamorus.art
Priority: NOR    
Version First Reported In: 5.2.6   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Leonardo 2021-11-29 03:02:35 UTC
SUMMARY
Attempting to cut-paste or copy-paste a Clone Layer automatically converts it into a Paint Layer. This means it's not possible to cut a Clone Layer from somewhere in the stack and paste it somewhere else to quickly move it. The only way to move a Clone Layer is by dragging it slowly through the entire stack.

STEPS TO REPRODUCE
1. Create a Paint Layer and draw something on it.
2. Select it on the Layers docker and create a Clone Layer from it.
3. Select the Clone Layer on the Layers docker and press Ctrl-X or Ctrl+C, alternatively, right click on the Clone Layer and click Cut Layer or Copy Layer.
4. Press Ctrl+V or right click on the stack and click Paste Layer.

OBSERVED RESULT
What's pasted is a Paint Layer. You can edit it, and editing the first Paint Layer you created doesn't update what has been pasted.

EXPECTED RESULT
A Clone Layer should have been pasted, so that the Clone Layer you cut effectively just moved around, or that you've created a second clone of the first Paint Layer.

SOFTWARE/OS VERSIONS
Windows: 7

ADDITIONAL INFORMATION
I haven't tested all layer types, but cut-pasting a Fill Layer works as expected. 

If the Clone Layer is in a Group and you cut-paste the Group, the whole Group is pasted as-is and the Clone Layer isn't converted.

Given the above, converting the Clone Layer to a Paint Layer is inconsistent with how layer pasting normally works.
Comment 1 Ahab Greybeard 2021-11-29 18:26:26 UTC
I can Confirm that this is the case for the 4.4.8 appimage and a recent 5.1.0-prealpha appimage.

I don't know if this was a design decision or a design oversight.
Comment 2 Reinold Rojas 2024-12-10 04:02:02 UTC
Reconfirming for 5.2.6. Copying a clone layer will paste a paint layer. Same reproduce steps still work:

STEPS TO REPRODUCE
1. Create a Paint Layer and draw something on it.
2. Select it on the Layers docker and create a Clone Layer from it.
3. Select the Clone Layer on the Layers docker and press Ctrl-X or Ctrl+C, alternatively, right click on the Clone Layer and click Cut Layer or Copy Layer.
4. Press Ctrl+V or right click on the stack and click Paste Layer.
Comment 3 Ahab Greybeard 2024-12-10 10:19:23 UTC
You can do right-click -> Duplicate Layer or Mask. That will create a new identical clone layer that can also be Duplicated.
This is created immediately above the layer that is Duplicated, as might be expected.
I think the Cut/Copy/Paste actions are only concerned with composited image content, not layer type/structure.