UI: Focus correct filter list when opening filter view

When the filter view is created, the first item of the asyncFilters list
would be selected (if the source supports asyncFilters) and have its
properties shown.
This means that when no items were in the asyncFilters list, no
properties would be shown, even if an effect filter was present.

Adds a check to focus the effectFilters list in case there are only
effect filters, which makes the correct properties appear.
This commit is contained in:
gxalpha 2021-08-26 00:10:02 +02:00 committed by Jim
parent 25204b3e68
commit 01d91ee600

View file

@ -121,6 +121,11 @@ OBSBasicFilters::OBSBasicFilters(QWidget *parent, OBSSource source_)
ui->separatorLine->setVisible(false);
}
if (async && !audioOnly && ui->asyncFilters->count() == 0 &&
ui->effectFilters->count() != 0) {
ui->effectFilters->setFocus();
}
if (audioOnly || (audio && !async))
ui->asyncLabel->setText(QTStr("Basic.Filters.AudioFilters"));