frontend: Fix deprecated header order in Add Source dialog

This commit is contained in:
jcm
2026-07-17 17:07:57 -06:00
committed by Ryan Foster
parent 0218aa658f
commit 01e68ca6ad

View File

@@ -546,10 +546,10 @@ void OBSBasicSourceSelect::rebuildSourceTypeList()
// Shift Deprecated sources to the bottom
QList<QListWidgetItem *> deprecatedItems;
for (int i = 0; i < ui->sourceTypeList->count(); ++i) {
for (int i = ui->sourceTypeList->count() - 1; i >= 0; --i) {
QListWidgetItem *item = ui->sourceTypeList->item(i);
if (!item) {
break;
continue;
}
bool isDeprecated = item->data(kDeprecatedRole).toBool();
@@ -562,6 +562,7 @@ void OBSBasicSourceSelect::rebuildSourceTypeList()
}
}
std::reverse(deprecatedItems.begin(), deprecatedItems.end());
for (const auto &item : deprecatedItems) {
ui->sourceTypeList->addItem(item);
}