diff options
Diffstat (limited to 'qt-ui/downloadfromdivecomputer.cpp')
-rw-r--r-- | qt-ui/downloadfromdivecomputer.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp index 4127376ac..907a49af6 100644 --- a/qt-ui/downloadfromdivecomputer.cpp +++ b/qt-ui/downloadfromdivecomputer.cpp @@ -554,7 +554,13 @@ void DownloadFromDCWidget::bluetoothSelectionDialogIsFinished(int result) { if (result == QDialog::Accepted) { /* Make the selected Bluetooth device default */ - ui.device->setCurrentText(btDeviceSelectionDialog->getSelectedDeviceName()); + QString selectedDeviceName = btDeviceSelectionDialog->getSelectedDeviceName(); + + if (selectedDeviceName == NULL || selectedDeviceName.isEmpty()) { + ui.device->setCurrentText(btDeviceSelectionDialog->getSelectedDeviceAddress()); + } else { + ui.device->setCurrentText(selectedDeviceName); + } } else if (result == QDialog::Rejected){ /* Disable Bluetooth download mode */ ui.bluetoothMode->setChecked(false); |