mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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 <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
51ef56fbcb
commit
40bc4b629a
2 changed files with 20 additions and 0 deletions
|
@ -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";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue