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>
This commit is contained in:
Anton Lundin 2014-10-16 01:13:52 +02:00 committed by Dirk Hohndel
parent 40bc4b629a
commit 3785c76657
2 changed files with 5 additions and 0 deletions

View file

@ -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 */

View file

@ -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>