From c6ebc44eefb515c26bb3aff9b5184cd64d0d231e Mon Sep 17 00:00:00 2001 From: Floris Bos Date: Fri, 27 Jun 2014 14:39:48 +0200 Subject: [PATCH] Fix 'ok' button enabling in add OS dialog after switching tabs --- BerrybootGUI2.0/adddialog.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/BerrybootGUI2.0/adddialog.cpp b/BerrybootGUI2.0/adddialog.cpp index ecdb68906..1376e830b 100644 --- a/BerrybootGUI2.0/adddialog.cpp +++ b/BerrybootGUI2.0/adddialog.cpp @@ -477,7 +477,9 @@ void AddDialog::on_osList_currentRowChanged(int) void AddDialog::on_groupTabs_currentChanged(int) { - ui->buttonBox->button(ui->buttonBox->Ok)->setEnabled(false); + QListWidget *osList = qobject_cast(ui->groupTabs->currentWidget()); + bool selected = osList && !osList->selectedItems().isEmpty(); + ui->buttonBox->button(ui->buttonBox->Ok)->setEnabled(selected); } void AddDialog::accept()