Uh oh!
There was an error while loading. Please reload this page.
Sort scene lists and transition dropdowns alphabetically - #2
Merged
Merged
Conversation
OBS enumerates scenes and transitions in dock order, which turns the mark editor's "When coming from" / "And going to" lists and the transition pickers into a hunt once a collection grows. Sort all three case-insensitively (case only breaks ties, so the order stays stable). Scene lists are sorted after any names the matcher references but the collection no longer has are appended, so those stay in place alphabetically rather than piling up at the end. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TUpBn7UAgdF4XVBGSQJVfv
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
What
Scene and transition pickers in the mark editor are now sorted alphabetically instead of following OBS's dock order:
Why
obs_canvas_enum_scenesandobs_frontend_get_transitionshand back items in dock order, which is effectively arbitrary once a collection grows past a handful of scenes. Finding a scene in the matcher lists meant scanning the whole list.How
A small
SortNames()helper in the anonymous namespace does a case-insensitive comparison, falling back to a case-sensitive one to break ties so the ordering is stable and deterministic.Two details worth noting:
TransitionNames()itself is left in OBS order; sorting happens where the combo boxes are filled. This keepstransitions.first()inAddMark()/AddCandidate()seeding new candidates with OBS's first transition, as before, rather than whichever transition happens to sort first.Testing
Qt and the OBS headers aren't available in this environment, so the plugin was not compiled here — CI covers the build.
clang-format --dry-run -Werrorpasses on the changed file.🤖 Generated with Claude Code
https://claude.ai/code/session_01TUpBn7UAgdF4XVBGSQJVfv
Generated by Claude Code