Skip to content

Commit

Permalink
Fix 'ok' button enabling in add OS dialog after switching tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnet committed Jun 27, 2014
1 parent ee380f4 commit c6ebc44
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion BerrybootGUI2.0/adddialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<QListWidget *>(ui->groupTabs->currentWidget());
bool selected = osList && !osList->selectedItems().isEmpty();
ui->buttonBox->button(ui->buttonBox->Ok)->setEnabled(selected);
}

void AddDialog::accept()
Expand Down

0 comments on commit c6ebc44

Please sign in to comment.