summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
authorGravatar Jocke <j.bygdell@gmail.com>2018-10-09 19:08:03 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-09 21:04:23 -0700
commite7fd50113facfe9d483ac02e1c8ac00a699fa03a (patch)
treee27592391adab3898704044114e46ab64461a281 /mobile-widgets
parent0f588f522773aa280e72414d282c6385c26655d9 (diff)
downloadsubsurface-e7fd50113facfe9d483ac02e1c8ac00a699fa03a.tar.gz
Mobile/rememberDC: update matching logic
Update the matching logic to account for known and unknown BT DCs. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Diffstat (limited to 'mobile-widgets')
-rw-r--r--mobile-widgets/qml/DownloadFromDiveComputer.qml13
1 files changed, 9 insertions, 4 deletions
diff --git a/mobile-widgets/qml/DownloadFromDiveComputer.qml b/mobile-widgets/qml/DownloadFromDiveComputer.qml
index 3d6649226..a2b6e0c77 100644
--- a/mobile-widgets/qml/DownloadFromDiveComputer.qml
+++ b/mobile-widgets/qml/DownloadFromDiveComputer.qml
@@ -182,17 +182,22 @@ Kirigami.Page {
dc1.enabled = dc2.enabled = dc3.enabled = dc4.enabled = true
for (var i = 1; i < 5; i++) {
if (comboProduct.currentIndex === -1 && currentText === "FTDI"){
- if ( eval("PrefDiveComputer.vendor" + i) === comboVendor.currentText && eval("PrefDiveComputer.device" + i).toUpperCase() === currentText){
+ if ( eval("PrefDiveComputer.vendor" + i) === comboVendor.currentText && eval("PrefDiveComputer.device" + i).toUpperCase() === currentText)
rememberedDCsGrid.setDC(eval("PrefDiveComputer.vendor" + i), eval("PrefDiveComputer.product" + i), ("PrefDiveComputer.device" + i))
- }
}else if (comboProduct.currentIndex !== -1 && currentText === "FTDI") {
- if ( eval("PrefDiveComputer.vendor" + i) === comboVendor.currentText && eval("PrefDiveComputer.product" + i) === comboProduct.currentText && eval("PrefDiveComputer.device" + i).toUpperCase() === currentText){
+ if ( eval("PrefDiveComputer.vendor" + i) === comboVendor.currentText && eval("PrefDiveComputer.product" + i) === comboProduct.currentText && eval("PrefDiveComputer.device" + i).toUpperCase() === currentText) {
eval("dc"+ i + ".enabled = false")
+ break
}
- }else if ( eval("PrefDiveComputer.vendor" + i) === comboVendor.currentText && eval("PrefDiveComputer.product" + i) === comboProduct.currentText && eval("PrefDiveComputer.product" + i) +" " + eval("PrefDiveComputer.device" + i).toUpperCase() === currentText){
+ }else if ( eval("PrefDiveComputer.vendor" + i) === comboVendor.currentText && eval("PrefDiveComputer.product" + i) === comboProduct.currentText && eval("PrefDiveComputer.product" + i) +" " + eval("PrefDiveComputer.device" + i) === currentText) {
+ eval("dc"+ i + ".enabled = false")
+ break
+ }else if ( eval("PrefDiveComputer.vendor" + i) === comboVendor.currentText && eval("PrefDiveComputer.product" + i) === comboProduct.currentText && eval("PrefDiveComputer.device" + i) === currentText) {
eval("dc"+ i + ".enabled = false")
+ break
}
}
+
}
}
}