GUI: deactivate »add additional parts/append to« if no files present in drop action dialog

This commit is contained in:
Moritz Bunkus 2015-09-19 08:05:23 +02:00
parent 96458ae79b
commit c46591157e
2 changed files with 7 additions and 1 deletions

View File

@ -77,7 +77,7 @@
</widget>
</item>
<item>
<widget class="QLabel" name="label_3">
<widget class="QLabel" name="lAppendTo">
<property name="text">
<string>If you want to append or add them as additional parts you have to select which input file to append or add them to:</string>
</property>

View File

@ -26,6 +26,12 @@ AddingAppendingFilesDialog::AddingAppendingFilesDialog(QWidget *parent,
ui->cbFileName->addItem(Q("%1 (%2)").arg(info.fileName()).arg(info.path()));
}
if (files.isEmpty()) {
ui->lAppendTo->setEnabled(false);
ui->rbAppend->setEnabled(false);
ui->rbAddAdditionalParts->setEnabled(false);
}
adjustSize();
}