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 #1875

Closed
wants to merge 2 commits into from

Conversation

MrStevns
Copy link
Member

@MrStevns MrStevns commented Aug 25, 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

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 the Bug label Aug 25, 2024
@MrStevns MrStevns changed the title AC-1873 - Fix frame not being drawn on the timeline Iss: 1873 - Fix frame not being drawn on the timeline Sep 23, 2024
@MrStevns MrStevns changed the title Iss: 1873 - Fix frame not being drawn on the timeline iss: 1873 - Fix frame not being drawn on the timeline Sep 23, 2024
@MrStevns MrStevns added this to the 0.7.1 milestone Sep 25, 2024
@MrStevns MrStevns changed the base branch from master to release/0.7.1 November 4, 2024 06:51
@MrStevns MrStevns changed the base branch from release/0.7.1 to master November 4, 2024 06:51
@MrStevns
Copy link
Member Author

MrStevns commented Nov 4, 2024

Replaced by #1887 as I made these changes with master as origin, so it can't go into an eventual 0.7.1 branch

@MrStevns MrStevns closed this Nov 4, 2024
@chchwy chchwy modified the milestones: 0.7.1, 0.8.0 Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Discarded
Development

Successfully merging this pull request may close these issues.

Timeline frame disappear
2 participants