summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-10-16 01:13:52 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-10-16 11:07:00 +0200
commit3785c766573066965f799b2e253a1ef3385cf36b (patch)
treede27e459558d5282084fd02581e762004ee5e45f /qt-ui
parent40bc4b629a7592e64374c16cd32b5349555cd96f (diff)
downloadsubsurface-3785c766573066965f799b2e253a1ef3385cf36b.tar.gz
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 <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/configuredivecomputerdialog.cpp2
-rw-r--r--qt-ui/configuredivecomputerdialog.ui3
2 files changed, 5 insertions, 0 deletions
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 @@
</item>
<item>
<widget class="QPushButton" name="updateFirmwareButton">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
<property name="text">
<string>Update firmware</string>
</property>