Bug 492732 - Duplicating / Pasting Animated Layer doesn't move the frame selection properly.
Summary: Duplicating / Pasting Animated Layer doesn't move the frame selection properly.
Status: RESOLVED WORKSFORME
Alias: None
Product: krita
Classification: Applications
Component: Animation (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-06 23:14 UTC by Emmet O'Neill
Modified: 2024-09-16 23:44 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Emmet O'Neill 2024-09-06 23:14:51 UTC
SUMMARY

When a single frame is selected on the AnimationTimeline frames view, normally selecting or moving a layer in the LayerBox, the FRAME selection moves with the LAYER selection to focus on the active/visible layer.

However, when duplicating or pasting a layer, the LAYER selection is changed to focus on the NEW layer, but the FRAME selection is still pointing to a frame on the OLD layer. 

This is a minor issue, but has the effect of somewhat confusing behavior when adding or removing frames in this scenario.


STEPS TO REPRODUCE
1. In a file with a layer, duplicate or copy/paste a second animated layer into the document. 
2. Hit the "add keyframe" button on the Animation Timeline Docker's toolbar.

OBSERVED RESULT
Notice that the frame that you've added has appeared on the previously selected layer. 
(The one that you copied from, not the one that you just pasted.)


EXPECTED RESULT
Having been confused about this myself, I think it'd probably be less confusing to have the single fame selection move to the newly pasted layer, so that hitting the "Add Frame" button adds a frame on the new one without requiring an extra click. (Though this is probably up for debate.)


SOFTWARE/OS VERSIONS
Fedora 40 Linux, gnome x11, git master as of writing this, built with dmitry's docker.
Comment 1 Dmitry Kazakov 2024-09-13 11:59:04 UTC
Hi, Emmet!

I cannot reproduce the issue here locally (at least on Windows). I have two different ways how it behaves and it looks consistent with the rest of list-box behavior:

Case 1: frame selection is on the currently active layer, and active layer is duplicated

1) Select a layer, select a frame on this layer on the timeline
2) Duplicate this very layer
3) The new layer appears on the timeline and a frame is selected on it (as expected)

Case 2: frame selection is on any non-active layer, and active layer is duplicated

1) Select a layer, select a frame on any different layer
2) Duplicate active layer
3) The new layer appears on the timeline, but the frame is still selected on the old layer (since it is not on the active layer)

Can you confirm that the both cases work as I describe that? Or it works differently on Linux?

This behavior is the standard behavior of Qt's list controls. I'm not really sure we should change that (though we could discuss that with a wider community).
Comment 2 Dmitry Kazakov 2024-09-13 11:59:17 UTC
Add needsinfo
Comment 3 Emmet O'Neill 2024-09-16 23:44:28 UTC
Hey Dmitry, I think you're right because I can't reproduce this anymore either, which either means I was confused somehow (most likely... probably...) or there is some rare condition involved. The other day when I was testing for a different bug I felt like I ran into some unexpected behavior, but everything seems to be working as expected now. *shrug*

Let's go ahead and close this for now, and I'll open it again in the future if I happen to run into something unexpected again.
Sorry for the false alarm. lol :)