SUMMARY Copy and pasting a selection twice in a row produces a blank layer. Copying a selected area works the first time, creating a new layer (Layer 2) with a copy of the selection from Layer 1. If you immediately copy and paste from Layer 2, however, it creates a new blank layer (Layer 3), despite the fact that Layer 2 still has an active selection box and one would expect the selection to be copied into Layer 3. If you create a new selection box around the material in Layer 2, it will copy correctly to Layer 3, but you can no longer do multiple copy and pastes from one original selection. You have to manually reselect the material again. This used to work correctly prior to 5.0. It may have worked correctly in 5.0 itself but I don't remember if I encountered the problem prior to 5.1 or not. STEPS TO REPRODUCE 1. Select an area in Layer 1 2. Ctrl C to copy then Ctrl V to paste, which creates Layer 2 3. Immediately Ctrl C and Ctrl V again to create Layer 3 OBSERVED RESULT Layer 3 is blank. EXPECTED RESULT Layer 3 should be a copy of Layer 2 SOFTWARE/OS VERSIONS Qt Version (compiled): 5.12.12 Version (loaded): 5.12.12 OS Information Build ABI: x86_64-little_endian-lp64 Build CPU: x86_64 CPU: x86_64 Kernel Type: linux Kernel Version: 5.18.18-200.fc36.x86_64 Pretty Productname: Fedora Linux 36 (Cinnamon) Product Type: fedora Product Version: 36 Desktop: X-Cinnamon ADDITIONAL INFORMATION
I'm sorry, but I cannot reproduce this with the 5.1.0 appimage or with a build from current git master.
It happens continuously for me. It also happens when I move the copied material. The selection box moves with the new layer and still surrounds the newly-copied material, but Ctrl C and Ctrl V to copy what's on Layer 2 produces a new blank Layer 3. 1. Select and area in Layer 1 2. Ctrl C to copy then Ctrl V to paste, which creates Layer 2 3. Move the newly-copied material on Layer 2 to a different position. The selection box will follow it. 4. Ctrl C and then Ctrl V to create Layer 3. Layer 3 will be blank. On the Layers docker, there is a visible difference in the shape of the layer icon for Layer 3. For example, in what I just did to test this, Layer 1 and Layer 2 icons are square, but the Layer 3 icon is a narrow, upright rectangle. Hovering over the icons, Layer 1 and Layer 2 show previews of what's on the layer, but Layer 3 shows a blank layer.
Hi, Autumn! Could you please make a video of the problem? And, probably, attach a test file. I cannot reproduce this problem, neither on Windows, nor on Linux.
Created attachment 152127 [details] Video of bug Here's a video of the bug in action.
Created attachment 152128 [details] Krita file used in video And here's the document from that video.
Thanks for your comment! Automatically switching the status of this bug to REPORTED so that the KDE team knows that the bug is ready to get confirmed. In the future you may also do this yourself when providing needed information.
Okay, I see what the problem is. The Move Tool action is not finished by the time Ctrl+C is pressed. As a temporary workaround, please just press Enter key after doing the move and pressing Ctrl+C. And I will look for a proper solution in code.
Git commit b0022ad9b5d71b6a6fdca8fa87c1cdd90a8a9e20 by Dmitry Kazakov. Committed on 19/09/2022 at 13:43. Pushed by dkazakov into branch 'master'. Fix copy-paste operation not working after using the move tool The copying should force-finish the move operation M +2 -0 libs/ui/actions/kis_selection_action_factories.cpp https://invent.kde.org/graphics/krita/commit/b0022ad9b5d71b6a6fdca8fa87c1cdd90a8a9e20
Git commit 9ed1797d99fafe31731ec80b1cc085b5cb4540a8 by Dmitry Kazakov. Committed on 19/09/2022 at 13:43. Pushed by dkazakov into branch 'krita/5.1'. Fix copy-paste operation not working after using the move tool The copying should force-finish the move operation (cherry picked from commit b0022ad9b5d71b6a6fdca8fa87c1cdd90a8a9e20) M +2 -0 libs/ui/actions/kis_selection_action_factories.cpp https://invent.kde.org/graphics/krita/commit/9ed1797d99fafe31731ec80b1cc085b5cb4540a8
Thanks for the workaround, Dmitry. :)