diff options
Diffstat (limited to 'desktop-widgets/downloadfromdivecomputer.cpp')
-rw-r--r-- | desktop-widgets/downloadfromdivecomputer.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/desktop-widgets/downloadfromdivecomputer.cpp b/desktop-widgets/downloadfromdivecomputer.cpp index b37f854bc..2929a25da 100644 --- a/desktop-widgets/downloadfromdivecomputer.cpp +++ b/desktop-widgets/downloadfromdivecomputer.cpp @@ -78,6 +78,19 @@ DownloadFromDCWidget::DownloadFromDCWidget(QWidget *parent, Qt::WindowFlags f) : ui.product->setCurrentIndex(ui.product->findText(qPrefDiveComputer::product())); } + // now lets set the four shortcuts for previously used dive computers +#define SETUPDC(num) \ + if (!qPrefDiveComputer::vendor##num().isEmpty()) { \ + ui.DC##num->setVisible(true); \ + ui.DC##num->setText(qPrefDiveComputer::vendor##num() + " - " + qPrefDiveComputer::product##num()); \ + } else { \ + ui.DC##num->setVisible(false); \ + } + SETUPDC(1) + SETUPDC(2) + SETUPDC(3) + SETUPDC(4) + updateState(INITIAL); ui.ok->setEnabled(false); ui.downloadCancelRetryButton->setEnabled(true); |