From 01d91ee6001aa11c248dae50611920207aee0d63 Mon Sep 17 00:00:00 2001 From: gxalpha Date: Thu, 26 Aug 2021 00:10:02 +0200 Subject: [PATCH] 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. --- UI/window-basic-filters.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/UI/window-basic-filters.cpp b/UI/window-basic-filters.cpp index 747c05cad..e73a0e698 100644 --- a/UI/window-basic-filters.cpp +++ b/UI/window-basic-filters.cpp @@ -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"));