diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-06-05 09:18:17 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-06-11 13:55:41 -0700 |
commit | 8faf33eac6eb770dca8b4ffae1bc5bffe1d865d9 (patch) | |
tree | b714bfaa32fe5792036a1b798ccfe146e09d35d4 | |
parent | bde73f05d44d633aac320122eacd76df2ae64dc4 (diff) | |
download | subsurface-8faf33eac6eb770dca8b4ffae1bc5bffe1d865d9.tar.gz |
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 <dirk@hohndel.org>
-rw-r--r-- | mobile-widgets/qml/DownloadFromDiveComputer.qml | 9 |
1 files 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 { |