Fix timeline panel not populating on session restore#234
Open
throb wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
Open
Fix timeline panel not populating on session restore#234throb wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
throb wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
Conversation
Two issues prevented the timeline panel from displaying after loading a saved session: 1. Race condition in SessionModel: updateViewportCurrentMediaContainer- IndexFromBackend() was called before the model tree was fully built. The async requestData(childrenRole) populates playlists and their children (timelines) progressively, but the container lookup ran before the timeline nodes existed. Added a re-trigger of both container index lookups at the end of processChildren() when the parent type is Session, Container List, or Playlist. 2. QML timeline panel only handled typeRole=="Timeline" in viewedMediaSetChanged(). When the restored viewed container is a Playlist (which is common — the session stores the Playlist UUID), the timeline panel did nothing. Added a Playlist handler that finds the first Timeline child in the Playlist's Container List and switches the viewed container to it, with async retry if the children haven't loaded yet. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
updateViewportCurrentMediaContainerIndexFromBackend()ran before the model tree was fully built. The asyncrequestData(childrenRole)populates playlists and their timeline children progressively, but the container lookup executed before timeline nodes existed in the tree. Added a re-trigger of both container index lookups at the end ofprocessChildren()when the parent type is Session, Container List, or Playlist.typeRole=="Timeline": When the restored viewed container is a Playlist (common — the session stores the Playlist UUID, not the Timeline UUID), the timeline panel did nothing. Added a Playlist handler that finds the first Timeline child in the Playlist's Container List and switches the viewed container to it, with async retry if children haven't loaded yet.This fixes the "Saved sessions might not restore media correctly (Windows only)" known issue from the README — though the timing bug in
processChildrenaffects all platforms, not just Windows.Test plan
🤖 Generated with Claude Code