Skip to content

bug: frontend: Add Source lists the existing sources of a type in creation order instead of by name (upstream obsproject/obs-studio#13947) #604

Closed

Description

@rdoupe

Upstream OBS bug, reported by tiberium-v in obsproject/obs-studio#13947 (OBS 32.2 to 33.0.0-beta4, labelled as a regression and confirmed upstream): in the new Add Source dialog, the existing sources of a type (for example Image) are not listed alphabetically. Before 32.2 the dialog's list sorted them by name. Still present upstream and in this fork; upstream PR obsproject/obs-studio#13952 (Warchamp7) adds the sort back but is not merged.

Location

  • frontend/dialogs/OBSBasicSourceSelect.cpp updateExistingSources() (line 382) filters the sources gathered by refreshSources() (line 362, obs_enum_sources() order, then the scenes) by type (line 403) and adds a button for each one in that order. Nothing sorts them. The old dialog used a QListWidget with sorting enabled, which is how the list used to be alphabetical.

Class

Wrong order in a list (no crash, no data change).

How it is reached

Add sources of one type with names out of alphabetical order (or rename them), then Sources > + (Add Source) and pick that type: the existing sources appear in creation order.

Reproduced in the current release

AppImage 33.0.0-beta6-799, headless under a private Xvfb, with a small test module that adds five Color Sources named Zeta, alpha, Mike, beta, Charlie to the current scene, opens Add Source, selects Color Source and reads the buttons:

Tab Listed
Color Source Zeta, alpha, Mike, beta, Charlie
Recently added (control, newest first by design) Charlie, beta, Mike, alpha, Zeta

Proposed fix and failing test

Fix (port of Warchamp7's obsproject/obs-studio#13952): sort the sources of a type by name, ignoring case, as before 32.2; the Recently Added list keeps creation order. The filter moves into a small helper (frontend/utility/source-select-list.cpp, Qt Core only) so it can be tested without the dialog; the sort reads each name once and uses a stable sort.

RED test (cmocka, test_source_select_list, real libobs sources of two dummy input types, no display):

  • a type's sources come back sorted by name, ignoring case;
  • guard: the Recently Added list keeps creation order;
  • guard: removed sources are not listed.

The first fails today in both libobs lanes, every run.

Activity

  1. rdoupe commented on Oct 13, 2026

    @rdoupe
    CollaboratorAuthor

    Claiming: this issue.

    1. RED: test_source_select_list (3 cases) asks the Add Source dialog's list helper for one type's existing sources, created out of alphabetical order: they come back in creation order. Guards check that Recently Added keeps creation order and removed sources stay out. 1 of 3 fails today.
    2. GREEN: sort a type's existing sources by name, ignoring case, as before 32.2 (port of Warchamp7's upstream fix); Recently Added unchanged.
      PR today.
  2. rdoupe commented on Oct 13, 2026

    @rdoupe
    CollaboratorAuthor

    @tiberium-v you reported this in obsproject/obs-studio#13947 (since 32.2, the Add Source dialog lists a type's existing sources in creation order instead of alphabetically), so a heads-up: it's fixed here in obs-rust by #605, with a regression test.

    Cause: the new Add Source dialog in 32.2 filtered the existing sources by type but kept the order they were gathered in, which is creation order; the old dialog sorted them by name. A type's existing sources are sorted by name again, ignoring case, while the "Recently Added" list keeps its creation order. The change follows Warchamp7's upstream PR (obsproject/obs-studio#13952), who is credited as co-author. In the obs-rust release the Image sources showed in creation order; a build with the fix lists them alphabetically.

    It will be in the next obs-rust daily release after 0.1.0-beta.20261012: https://github.com/obs-rust/obs-studio/releases (Windows, macOS and Linux builds; on Arch it's obs-studio-rust-git in the AUR). obs-rust is an AI-assisted fork of OBS.

    If you get a chance to try it, a reply here on whether your sources are back in alphabetical order would really help.

  3. tiberium-v commented on Oct 13, 2026

    @tiberium-v

    @rdoupe I'm not interrested. Warchamp already has a PR for that open, since that hole issue post was also coordinated with them. I will here unsubscribe, but also don't want to be pinged in the future in that repo again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions