Skip to content

Sort scene lists and transition dropdowns alphabetically - #2

Merged
ZombieHDGaming merged 1 commit into
masterfrom
claude/alphabetical-scene-ordering-wwhj3u
Sep 7, 2026
Merged

Sort scene lists and transition dropdowns alphabetically#2
ZombieHDGaming merged 1 commit into
masterfrom
claude/alphabetical-scene-ordering-wwhj3u

Conversation

@ZombieHDGaming

Copy link
Copy Markdown
Contributor

What

Scene and transition pickers in the mark editor are now sorted alphabetically instead of following OBS's dock order:

  • "When coming from" / "And going to" scene checklists
  • Transition dropdown on each candidate row
  • Preset default transition dropdown

Why

obs_canvas_enum_scenes and obs_frontend_get_transitions hand 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:

  • Scene lists are sorted after the pass that appends names the matcher references but the current collection no longer contains. Those missing entries (rendered in red) therefore sort into place alphabetically rather than piling up at the end of the list.
  • TransitionNames() itself is left in OBS order; sorting happens where the combo boxes are filled. This keeps transitions.first() in AddMark() / 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 -Werror passes on the changed file.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TUpBn7UAgdF4XVBGSQJVfv


Generated by Claude Code

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
@ZombieHDGaming
ZombieHDGaming merged commit f9ab069 into masterSep 7, 2026
6 checks passed
@ZombieHDGaming
ZombieHDGaming deleted the claude/alphabetical-scene-ordering-wwhj3u branch September 7, 2026 17:00
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@ZombieHDGaming@claude