diff options
author | Jocke <j.bygdell@gmail.com> | 2018-09-30 17:46:07 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-10-01 06:32:41 -0700 |
commit | a8953da02d1d61038c5c94887acee68a6088cbb1 (patch) | |
tree | 46bed38d8de51dc86ff2d2880d2f4c6b40b645de /core/downloadfromdcthread.cpp | |
parent | c504c080972dda1e7e9a3c3ec092a39db7027da5 (diff) | |
download | subsurface-a8953da02d1d61038c5c94887acee68a6088cbb1.tar.gz |
Mobile download from DC: show the correct DC rather than the latest
Since we now keep track of up to 4 DCs we don't want to display the last used one
but rather the one that is connected.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Diffstat (limited to 'core/downloadfromdcthread.cpp')
-rw-r--r-- | core/downloadfromdcthread.cpp | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/core/downloadfromdcthread.cpp b/core/downloadfromdcthread.cpp index 4e8dee74e..b6b5d9191 100644 --- a/core/downloadfromdcthread.cpp +++ b/core/downloadfromdcthread.cpp @@ -291,16 +291,6 @@ QStringList DCDeviceData::getProductListFromVendor(const QString &vendor) int DCDeviceData::getMatchingAddress(const QString &vendor, const QString &product) { - if (qPrefDiveComputer::vendor() == vendor && - qPrefDiveComputer::product() == product) { - // we are trying to show the last dive computer selected - for (int i = 0; i < connectionListModel.rowCount(); i++) { - QString address = connectionListModel.address(i); - if (address.contains(qPrefDiveComputer::device())) - return i; - } - } - for (int i = 0; i < connectionListModel.rowCount(); i++) { QString address = connectionListModel.address(i); if (address.contains(product)) @@ -453,14 +443,6 @@ device_data_t *DCDeviceData::internalData() int DCDeviceData::getDetectedVendorIndex() { - if (!qPrefDiveComputer::vendor().isEmpty()) { - // use the last one - for (int i = 0; i < vendorList.length(); i++) { - if (vendorList[i] == qPrefDiveComputer::vendor()) - return i; - } - } - #if defined(BT_SUPPORT) QList<BTDiscovery::btVendorProduct> btDCs = BTDiscovery::instance()->getBtDcs(); @@ -473,16 +455,6 @@ int DCDeviceData::getDetectedVendorIndex() int DCDeviceData::getDetectedProductIndex(const QString ¤tVendorText) { - if (!qPrefDiveComputer::vendor().isEmpty()) { - if (qPrefDiveComputer::vendor() == currentVendorText) { - // we are trying to show the last dive computer selected - for (int i = 0; i < productList[currentVendorText].length(); i++) { - if (productList[currentVendorText][i] == qPrefDiveComputer::product()) - return i; - } - } - } - #if defined(BT_SUPPORT) QList<BTDiscovery::btVendorProduct> btDCs = BTDiscovery::instance()->getBtDcs(); |