aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Jocke <j.bygdell@gmail.com>2018-09-23 11:47:22 +0200
committerGravatar Jan Mulder <jlmulder@xs4all.nl>2018-09-25 15:34:49 +0200
commit69cead138bf376d2ea02b4e5cc45a90b69afc3f3 (patch)
tree1871c2f6a506b522fd735ceb9ade935afd0fc5b4
parent0a3130cd865f17b38fc54d21ea72b31b0d8e7cd0 (diff)
downloadsubsurface-69cead138bf376d2ea02b4e5cc45a90b69afc3f3.tar.gz
Mobile/download DC: simplify startup
Since we now store the last used DCs in out preferences we can use the information to pre-populate the DC selector. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
-rw-r--r--mobile-widgets/qml/DownloadFromDiveComputer.qml9
1 files changed, 2 insertions, 7 deletions
diff --git a/mobile-widgets/qml/DownloadFromDiveComputer.qml b/mobile-widgets/qml/DownloadFromDiveComputer.qml
index f49eb1fa0..752697b34 100644
--- a/mobile-widgets/qml/DownloadFromDiveComputer.qml
+++ b/mobile-widgets/qml/DownloadFromDiveComputer.qml
@@ -348,13 +348,8 @@ Kirigami.Page {
onVisibleChanged: {
comboVendor.currentIndex = comboProduct.currentIndex = comboConnection.currentIndex = -1
- if (visible) {
- comboVendor.currentIndex = manager.getDetectedVendorIndex()
- comboProduct.currentIndex = manager.getDetectedProductIndex(comboVendor.currentText)
- comboConnection.currentIndex = manager.getMatchingAddress(comboVendor.currentText, comboProduct.currentText)
- manager.DC_vendor = comboVendor.currentText
- manager.DC_product = comboProduct.currentText
- manager.DC_devName = comboConnection.currentText
+ if (visible && PrefDiveComputer.vendor !== "" ) {
+ rememberedDCsGrid.setDC(PrefDiveComputer.vendor1, PrefDiveComputer.product1, PrefDiveComputer.device1)
}
}
}