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>
This commit is contained in:
Dirk Hohndel 2017-06-05 09:18:17 -07:00
parent bde73f05d4
commit 8faf33eac6

View file

@ -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 {