Commit b1e2a207 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Disable target selection combobox if necessary

 * Set the first target to active in the addtargetdialog's
   target selection combobox
 * Disable the combobox if there is only one element in it.
parent 72c3ba79
......@@ -47,6 +47,8 @@ AddTargetDialog::AddTargetDialog(Project *project, QWidget *parent) :
ui->targetComboBox->addItem(m_project->targetFactory()->displayNameForId(id),
id);
}
ui->targetComboBox->setCurrentIndex(0);
ui->targetComboBox->setEnabled(ui->targetComboBox->count() > 1);
connect(ui->buttonBox, SIGNAL(accepted()),
this, SLOT(accept()));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment