From 69cead138bf376d2ea02b4e5cc45a90b69afc3f3 Mon Sep 17 00:00:00 2001 From: Jocke Date: Sun, 23 Sep 2018 11:47:22 +0200 Subject: 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 --- mobile-widgets/qml/DownloadFromDiveComputer.qml | 9 ++------- 1 file 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) } } } -- cgit v1.2.3-70-g09d2