diff options
Diffstat (limited to 'desktop-widgets/downloadfromdivecomputer.cpp')
-rw-r--r-- | desktop-widgets/downloadfromdivecomputer.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/desktop-widgets/downloadfromdivecomputer.cpp b/desktop-widgets/downloadfromdivecomputer.cpp index 3c011e4a6..aeefb75a4 100644 --- a/desktop-widgets/downloadfromdivecomputer.cpp +++ b/desktop-widgets/downloadfromdivecomputer.cpp @@ -292,10 +292,16 @@ void DownloadFromDCWidget::on_downloadCancelRetryButton_clicked() data->setProduct(ui.product->currentText()); #if defined(BT_SUPPORT) data->setBluetoothMode(ui.bluetoothMode->isChecked()); - if (data->bluetoothMode() && btDeviceSelectionDialog != NULL) { - // Get the selected device address - data->setDevName(btDeviceSelectionDialog->getSelectedDeviceAddress()); - data->setDevBluetoothName(btDeviceSelectionDialog->getSelectedDeviceName()); + if (data->bluetoothMode()) { + // Get the selected device address from dialog or from preferences + if (btDeviceSelectionDialog != NULL) { + data->setDevName(btDeviceSelectionDialog->getSelectedDeviceAddress()); + data->setDevBluetoothName(btDeviceSelectionDialog->getSelectedDeviceName()); + } else { + auto dc = SettingsObjectWrapper::instance()->dive_computer_settings; + data->setDevName(dc->dc_device()); + data->setDevBluetoothName(dc->dc_device_name()); + } } else // this breaks an "else if" across lines... not happy... #endif |