mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Disable update firmware button on any other action
Firmware updates can only be done on a newly opened device. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
f5176d908d
commit
117de891c7
1 changed files with 4 additions and 0 deletions
|
@ -722,6 +722,8 @@ void ConfigureDiveComputerDialog::readSettings()
|
|||
ui.progressBar->setValue(0);
|
||||
ui.progressBar->setFormat("%p%");
|
||||
ui.progressBar->setTextVisible(true);
|
||||
// Fw update is no longer a option, needs to be done on a untouched device
|
||||
ui.updateFirmwareButton->setEnabled(false);
|
||||
|
||||
config->readSettings(&device_data);
|
||||
}
|
||||
|
@ -1098,6 +1100,8 @@ void ConfigureDiveComputerDialog::on_restoreBackupButton_clicked()
|
|||
QString restorePath = QFileDialog::getOpenFileName(this, tr("Restore dive computer settings"),
|
||||
filename, tr("Backup files (*.xml)"));
|
||||
if (!restorePath.isEmpty()) {
|
||||
// Fw update is no longer a option, needs to be done on a untouched device
|
||||
ui.updateFirmwareButton->setEnabled(false);
|
||||
if (!config->restoreXMLBackup(restorePath, deviceDetails)) {
|
||||
QMessageBox::critical(this, tr("XML restore error"),
|
||||
tr("An error occurred while restoring the backup file.\n%1")
|
||||
|
|
Loading…
Add table
Reference in a new issue