Skip to content

Commit

Permalink
appchooserdialog: do not disable the OK button (#855)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kreijack committed Dec 11, 2022
1 parent e1183e7 commit 14f28fc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/appchooserdialog.cpp
Expand Up @@ -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);
}
Expand Down

0 comments on commit 14f28fc

Please sign in to comment.