From 8777945d0090ec68fcee927f9632a3e066fc7446 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 27 Sep 2018 07:08:57 -0700 Subject: Bluetooth: actually download from the device selected If we update the device with a shortcut button, this is the reliable way to get the information we need. Signed-off-by: Dirk Hohndel --- desktop-widgets/downloadfromdivecomputer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/desktop-widgets/downloadfromdivecomputer.cpp b/desktop-widgets/downloadfromdivecomputer.cpp index f55613581..df43dbdcb 100644 --- a/desktop-widgets/downloadfromdivecomputer.cpp +++ b/desktop-widgets/downloadfromdivecomputer.cpp @@ -368,8 +368,10 @@ void DownloadFromDCWidget::on_downloadCancelRetryButton_clicked() data->setDevName(btDeviceSelectionDialog->getSelectedDeviceAddress()); data->setDevBluetoothName(btDeviceSelectionDialog->getSelectedDeviceName()); } else { - data->setDevName(qPrefDiveComputer::device()); - data->setDevBluetoothName(qPrefDiveComputer::device_name()); + QString name, address; + address = extractBluetoothNameAddress(ui.device->currentText(), name); + data->setDevName(address); + data->setDevBluetoothName(name); } } else // this breaks an "else if" across lines... not happy... -- cgit v1.2.3-70-g09d2