From 8faf33eac6eb770dca8b4ffae1bc5bffe1d865d9 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 5 Jun 2017 09:18:17 -0700 Subject: QML UI: correctly set up the divecomputer for download If we find a paired BT divecomputer, this will populate vendor and product correctly for that device. Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/DownloadFromDiveComputer.qml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mobile-widgets/qml/DownloadFromDiveComputer.qml b/mobile-widgets/qml/DownloadFromDiveComputer.qml index c4dc70790..b05c1fc9f 100644 --- a/mobile-widgets/qml/DownloadFromDiveComputer.qml +++ b/mobile-widgets/qml/DownloadFromDiveComputer.qml @@ -58,13 +58,18 @@ Kirigami.Page { Layout.fillWidth: true model: vendorList currentIndex: manager.getVendorIndex() + onCurrentTextChanged: { + comboProduct.model = manager.getDCListFromVendor(comboVendor.currentText) + if (currentIndex == manager.getVendorIndex()) + comboProduct.currentIndex = manager.getProductIndex() + } } Kirigami.Label { text: qsTr(" Dive Computer:") } ComboBox { id: comboProduct Layout.fillWidth: true - model: manager.getDCListFromVendor(comboVendor.currentText) - currentIndex: manager.getProductIndex() + model: null + currentIndex: -1 } Kirigami.Label { text: qsTr("Bluetooth download:") } CheckBox { -- cgit v1.2.3-70-g09d2