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 2 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

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.
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.

1 participant