diff options
Diffstat (limited to 'qt-ui/configuredivecomputerdialog.cpp')
-rw-r--r-- | qt-ui/configuredivecomputerdialog.cpp | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/qt-ui/configuredivecomputerdialog.cpp b/qt-ui/configuredivecomputerdialog.cpp index 733d64a4f..c9e8da751 100644 --- a/qt-ui/configuredivecomputerdialog.cpp +++ b/qt-ui/configuredivecomputerdialog.cpp @@ -50,7 +50,8 @@ ConfigureDiveComputerDialog::ConfigureDiveComputerDialog(QWidget *parent) : if (default_dive_computer_device) ui->device->setEditText(default_dive_computer_device); - on_tabWidget_currentChanged(0); + ui->DiveComputerList->setCurrentRow(0); + on_DiveComputerList_currentRowChanged(0); } ConfigureDiveComputerDialog::~ConfigureDiveComputerDialog() @@ -435,23 +436,6 @@ void ConfigureDiveComputerDialog::on_restoreBackupButton_clicked() } } -void ConfigureDiveComputerDialog::on_tabWidget_currentChanged(int index) -{ - switch (index) { - case 0: - selected_vendor = "Heinrichs Weikamp"; - selected_product = "OSTC 3"; - break; - } - - int dcType = DC_TYPE_SERIAL; - - - if (selected_vendor == QString("Uemis")) - dcType = DC_TYPE_UEMIS; - fill_device_list(dcType); -} - void ConfigureDiveComputerDialog::on_updateFirmwareButton_clicked() { QString filename = existing_filename ?: prefs.default_filename; @@ -466,3 +450,20 @@ void ConfigureDiveComputerDialog::on_updateFirmwareButton_clicked() config->startFirmwareUpdate(firmwarePath, &device_data, errText); } } + +void ConfigureDiveComputerDialog::on_DiveComputerList_currentRowChanged(int currentRow) +{ + switch (currentRow) { + case 0: + selected_vendor = "Heinrichs Weikamp"; + selected_product = "OSTC 3"; + break; + } + + int dcType = DC_TYPE_SERIAL; + + + if (selected_vendor == QString("Uemis")) + dcType = DC_TYPE_UEMIS; + fill_device_list(dcType); +} |