Bug 459132 - Moving selected content sometimes duplicates the content
Summary: Moving selected content sometimes duplicates the content
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Selection (other bugs)
Version First Reported In: 5.1.1
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2022-09-15 02:42 UTC by tomtomtomreportingin
Modified: 2022-11-20 17:10 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Content sometimes duplicates on move, and also disappears when undoing the operation (2.81 MB, video/webm)
2022-09-18 21:30 UTC, tomtomtomreportingin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tomtomtomreportingin 2022-09-15 02:42:44 UTC
SUMMARY
I think sometime around 5.1.0, I've observed that Krita will sometimes duplicate selected content once they're moved. I'm not sure what specifically causes this behavior as it seems to be a bit sporadic, but it most often happens with multi-layered multi-grouped documents.

I do not know if this also occurs with the Transform tool. At the very least, I've observed it happening with Pixel selections.

STEPS TO REPRODUCE
1. Select some content.
2. Move it.

OBSERVED RESULT
It appears that a duplicate of the content is moved instead. The original content stays where it is, and it doesn't seem like refreshing the layer fixes the problem. It seems that undoing this operation will also sometimes remove the original content, so this issue has potential to be destructive.

EXPECTED RESULT
The content is moved without any duplicates left behind.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian sid
KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.97.0
Qt Version: 5.12.12 (appimage)
Comment 1 tomtomtomreportingin 2022-09-18 21:30:26 UTC
Created attachment 152197 [details]
Content sometimes duplicates on move, and also disappears when undoing the operation

I've attached a video capturing the buggy behavior.

A group layer might be necessary, as I haven't been able to reproduce this with ungrouped content.

The loss of data when undoing the operation is worrying. I'm marking this as a regression as I do not recall this happening in 5.0.
Comment 2 Dmitry Kazakov 2022-09-19 13:14:45 UTC
Hi, tomtomtom!

How do ou switch between the two tools? What shortcut do ou use?

And what is the layout of the layers? You said a group layer is necessary, but what exactly the hierarchy look like?
Comment 3 tomtomtomreportingin 2022-09-19 15:51:20 UTC
I've been using basic keyboard shortcuts: "s" key for freehand selection tool, "c" key for move tool. No modifers or canvas inputs involved.

The layer structure in the above webm should be the following:

- Group Layer
-> Paint Layer 1
- Locked Background Paint Layer

All actions are taken on Paint Layer 1.
Comment 4 tomtomtomreportingin 2022-09-19 16:22:23 UTC
Also, this is with the "Move current layer" move mode. I haven't been able to reproduce the issue with other move modes, but it happens regardless if it's a pixel or vector selection, and regardless of anti-aliasing.
Comment 5 Dmitry Kazakov 2022-09-20 07:06:41 UTC
Hi, Tomtomtom!

What is the size of the image in question?
Comment 6 tomtomtomreportingin 2022-09-20 14:42:18 UTC
3024x4299
Comment 7 tomtomtomreportingin 2022-09-30 07:28:04 UTC
I just reproduced this issue on a 192x106 canvas with only one layer, no groups. Still don't know why it happens though.
Comment 8 tomtomtomreportingin 2022-11-20 17:10:42 UTC
Cannot reproduce this in recent 5.1 versions like 5.1.3, so I suppose it could be considered fixed.