From 3785c766573066965f799b2e253a1ef3385cf36b Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Thu, 16 Oct 2014 01:13:52 +0200 Subject: Enable/Disable Update Firmware button based on dc Disable the Update Firmware button if you choose a device that we don't support update firmware for. Signed-off-by: Anton Lundin Signed-off-by: Dirk Hohndel --- qt-ui/configuredivecomputerdialog.cpp | 2 ++ qt-ui/configuredivecomputerdialog.ui | 3 +++ 2 files changed, 5 insertions(+) (limited to 'qt-ui') diff --git a/qt-ui/configuredivecomputerdialog.cpp b/qt-ui/configuredivecomputerdialog.cpp index 97b76c8f1..17d2c44a4 100644 --- a/qt-ui/configuredivecomputerdialog.cpp +++ b/qt-ui/configuredivecomputerdialog.cpp @@ -537,10 +537,12 @@ void ConfigureDiveComputerDialog::on_DiveComputerList_currentRowChanged(int curr case 0: selected_vendor = "Heinrichs Weikamp"; selected_product = "OSTC 3"; + ui->updateFirmwareButton->setEnabled(true); break; case 1: selected_vendor = "Suunto"; selected_product = "Vyper"; + ui->updateFirmwareButton->setEnabled(false); break; default: /* Not Supported */ diff --git a/qt-ui/configuredivecomputerdialog.ui b/qt-ui/configuredivecomputerdialog.ui index f736bd393..73fb29e88 100644 --- a/qt-ui/configuredivecomputerdialog.ui +++ b/qt-ui/configuredivecomputerdialog.ui @@ -103,6 +103,9 @@ + + false + Update firmware -- cgit v1.2.3-70-g09d2