Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iss: 1873 - Fix frame not being drawn on the timeline #1887

Open
wants to merge 3 commits into
base: release/0.7.1
Choose a base branch
from

Conversation

MrStevns
Copy link
Member

@MrStevns MrStevns commented Nov 4, 2024

The reason for this is that while we keep a list of selected keyframes to move and paint on the timeline, a keyframe also has its own "isSelected" state. This state is backed up through undo/redo operations while the layer::getSelectedFrames is not.
We use the isSelected state to ignore selected frames in the TimeLineCells::paintFrames while we use Layer::getSelectedFrames() to paint the selected frames.

This means that we can get into a situation where the frame is neither painted as selected nor non selected because of the two different sources of truth.

The solution is to remove one of the sources. As such, I went ahead and removed isSelected from Keyframe, so there's only one truth. By doing so, said frames can no longer be put in a selected state through undo/redo operations, which I personally think is good. I've inspected a few other applications which does also not keep selections as undo/redo'able state.

There's also the benefit that we don't have to iterate through all frames to know which is selected.

To that end my conclusion is that we shouldn't have to do that either.

fixes #1873

This should bring back 5.15 bottles for our macOS runner.
The reason for this is that while we keep a list of keyframes to move and paint keyframes on the timeline, a keyframe also has its own "isSelected" state. This state is backed up through undo/redo operations which the layer::getSelectedFrames is not.

The solution is to remove isSelected from Keyframe, as there should only be one truth.
@MrStevns MrStevns added this to the 0.7.1 milestone Nov 4, 2024
@chchwy chchwy modified the milestones: 0.7.1, 0.8.0 Nov 11, 2024
@MrStevns MrStevns changed the base branch from release/0.7.1 to master November 11, 2024 06:32
@MrStevns MrStevns changed the base branch from master to release/0.7.1 November 11, 2024 06:32
@chchwy chchwy self-requested a review November 28, 2024 15:30
@chchwy chchwy self-assigned this Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs Review
Development

Successfully merging this pull request may close these issues.

2 participants