From 14f28fc57382c38d62ec246e2de13be0ac9b92f4 Mon Sep 17 00:00:00 2001 From: Goffredo Baroncelli Date: Sun, 11 Dec 2022 19:32:57 +0100 Subject: [PATCH] appchooserdialog: do not disable the OK button (#855) When we are not in the app view tab, don't change the enable state of the OK button; the selection may be reset by the menu-cache. --- src/appchooserdialog.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/appchooserdialog.cpp b/src/appchooserdialog.cpp index 14d9df59..cd841053 100644 --- a/src/appchooserdialog.cpp +++ b/src/appchooserdialog.cpp @@ -253,6 +253,11 @@ void AppChooserDialog::accept() { } void AppChooserDialog::onSelectionChanged() { + if(ui->tabWidget->currentIndex() != 0) { + // the selection may be reset by menu-cache, + // while the app menu view is not shown + return; + } bool isAppSelected = ui->appMenuView->isAppSelected(); ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(isAppSelected); }