From 40bc4b629a7592e64374c16cd32b5349555cd96f Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Thu, 16 Oct 2014 01:13:51 +0200 Subject: Don't allow writing before we got data Don't allow creation of backup files or writes to the computer before we know we got some data, either from a backup file or from the actual device. Signed-off-by: Anton Lundin Signed-off-by: Dirk Hohndel --- qt-ui/configuredivecomputerdialog.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'qt-ui/configuredivecomputerdialog.cpp') diff --git a/qt-ui/configuredivecomputerdialog.cpp b/qt-ui/configuredivecomputerdialog.cpp index 7a1ce24b1..97b76c8f1 100644 --- a/qt-ui/configuredivecomputerdialog.cpp +++ b/qt-ui/configuredivecomputerdialog.cpp @@ -324,6 +324,10 @@ void ConfigureDiveComputerDialog::deviceDetailsReceived(DeviceDetails *newDevice void ConfigureDiveComputerDialog::reloadValues() { + // Enable the buttons to do operations on this data + ui->saveSettingsPushButton->setEnabled(true); + ui->backupButton->setEnabled(true); + switch(ui->dcStackedWidget->currentIndex()) { case 0: reloadValuesOSTC3(); @@ -525,6 +529,10 @@ void ConfigureDiveComputerDialog::on_updateFirmwareButton_clicked() void ConfigureDiveComputerDialog::on_DiveComputerList_currentRowChanged(int currentRow) { + // Disable the buttons to do operations on this data + ui->saveSettingsPushButton->setEnabled(false); + ui->backupButton->setEnabled(false); + switch (currentRow) { case 0: selected_vendor = "Heinrichs Weikamp"; -- cgit v1.2.3-70-g09d2