Bug 411463

Summary: Copy Paste layer group to another document, group is flattened, group layers not preserved.
Product: [Applications] krita Reporter: Leo <leo>
Component: Layer StackAssignee: Dmitry Kazakov <dimula73>
Status: RESOLVED FIXED    
Severity: normal CC: dimula73, halla
Priority: NOR    
Version First Reported In: 4.2.3   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Leo 2019-08-31 08:48:45 UTC
SUMMARY

Copy and paste layer group from one document to another flattens the group to a single layer. 

Expected result is the group layers are preserved.


STEPS TO REPRODUCE
1. two documents, one with a layer group containing multiple layers
2. Copy the layer group 
3. Paste to the other document

OBSERVED RESULT

Layer group has been flattened to a single layer. 

EXPECTED RESULT

Expected result is the group layers are preserved.


SOFTWARE/OS VERSIONS

Linux/KDE Plasma: 

Operating System: openSUSE Tumbleweed 20190209
KDE Plasma Version: 5.14.5
Qt Version: 5.12.0
KDE Frameworks Version: 5.54.0
Kernel Version: 4.20.6-1-default
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-2670QM CPU @ 2.20GHz
Memory: 15.6 GiB of RAM


ADDITIONAL INFORMATION
Comment 1 Halla Rempt 2019-08-31 09:00:52 UTC
Hm, that works here.

I do:

Create two document
Create a group layer in doc 2 with two layers
paint a bit
right-click in the layerbox on the group layer and select copy
go to the other document (doesn't matter if it's in the same krita process/window or not)
paste
and I get a group layer with two sublayers (collapsed, but still a group layer)

Could you perhaps make a screen recording showing what you're doing exactly?
Comment 2 Bug Janitor Service 2019-09-15 04:33:09 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Bug Janitor Service 2019-09-30 04:33:08 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 4 Leo 2019-09-30 17:20:50 UTC
I started recording the video as requested and in the process figured out the issue.

Yes, I can copy the group layer.

No, I can not "Edit / Paste" (ctrl V) the layer group to a new document without it being flattened.

HOWEVER

If, I "Layer / Paste Layer"

Then pasting a layer group to a new document works.


This is an inconsistent behaviour.
Comment 5 Leo 2019-09-30 17:52:13 UTC
The reason I list this as an inconsistent behaviour is this:

There is:

a)
Layer / Copy Layer
Layer / Paste Layer

It works as expected.

b)
Edit / Copy
Layer / Paste Layer

This works

However

c)
Edit / Copy
Edit / Paste

Flattens the the layer group.

So if workflow b) successfully pastes the layer group, then workflow c) should also exhibit the same behaviour.
Comment 6 Dmitry Kazakov 2020-08-14 10:43:16 UTC
Hi, Leo!

I can reproduce neither scenario b) nor c). When there is no selection, Ctrl+C does not copy anything. Perhaps you just had some layers in the clipboard from the previous operation, therefore you could reproduce this inconsistency.

I'll try to check if I can make Ctrl+V shortcut paste any type of content, though I'm not sure it'll work.
Comment 7 Dmitry Kazakov 2020-08-14 11:38:13 UTC
Git commit f7509a5c5598b0de960e2c3e6deb2bf155cd3acf by Dmitry Kazakov.
Committed on 14/08/2020 at 11:37.
Pushed by dkazakov into branch 'krita/4.3'.

Make Ctrl+C/X/V shortcut work with layers when there is nothing else to copy

The new priority list for copying/cutting:

1) Cut/Copy selected vector shapes
2) Cut/Copy the content of pixel selection
3) Cut/Copy the selected layer

If the user wants to Cut/Copy a layer when there is a selection active,
then he/she should use a special Layer->Cut/Copy Layer menu action instead
of the default shortcut.
CC:kimageshop@kde.org

M  +6    -0    libs/ui/actions/KisPasteActionFactories.cpp
M  +13   -10   libs/ui/actions/kis_selection_action_factories.cpp

https://invent.kde.org/graphics/krita/commit/f7509a5c5598b0de960e2c3e6deb2bf155cd3acf
Comment 8 Dmitry Kazakov 2020-08-14 11:38:30 UTC
Git commit d402db85d8d0ee946369cae1875178cb08d8f2ec by Dmitry Kazakov.
Committed on 14/08/2020 at 11:38.
Pushed by dkazakov into branch 'master'.

Make Ctrl+C/X/V shortcut work with layers when there is nothing else to copy

The new priority list for copying/cutting:

1) Cut/Copy selected vector shapes
2) Cut/Copy the content of pixel selection
3) Cut/Copy the selected layer

If the user wants to Cut/Copy a layer when there is a selection active,
then he/she should use a special Layer->Cut/Copy Layer menu action instead
of the default shortcut.
CC:kimageshop@kde.org

M  +6    -0    libs/ui/actions/KisPasteActionFactories.cpp
M  +13   -10   libs/ui/actions/kis_selection_action_factories.cpp

https://invent.kde.org/graphics/krita/commit/d402db85d8d0ee946369cae1875178cb08d8f2ec