aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml
diff options
context:
space:
mode:
Diffstat (limited to 'mobile-widgets/qml')
-rw-r--r--mobile-widgets/qml/DownloadFromDiveComputer.qml14
1 files changed, 10 insertions, 4 deletions
diff --git a/mobile-widgets/qml/DownloadFromDiveComputer.qml b/mobile-widgets/qml/DownloadFromDiveComputer.qml
index 268a2aa69..8ee898014 100644
--- a/mobile-widgets/qml/DownloadFromDiveComputer.qml
+++ b/mobile-widgets/qml/DownloadFromDiveComputer.qml
@@ -67,12 +67,11 @@ Kirigami.Page {
}
columns: 2
Controls.Label { text: qsTr(" Vendor name: ") }
- property var vendoridx: downloadThread.data().getDetectedVendorIndex()
Controls.ComboBox {
id: comboVendor
Layout.fillWidth: true
model: vendorList
- currentIndex: parent.vendoridx
+ currentIndex: -1
delegate: Controls.ItemDelegate {
width: comboVendor.width
contentItem: Text {
@@ -100,10 +99,9 @@ Kirigami.Page {
Controls.Label { text: qsTr(" Dive Computer:") }
Controls.ComboBox {
id: comboProduct
- property var productidx: downloadThread.data().getDetectedProductIndex(comboVendor.currentText)
Layout.fillWidth: true
model: null
- currentIndex: productidx
+ currentIndex: -1
delegate: Controls.ItemDelegate {
width: comboProduct.width
contentItem: Text {
@@ -305,5 +303,13 @@ Kirigami.Page {
}
}
}
+
+ onVisibleChanged: {
+ if (visible) {
+ comboVendor.currentIndex = downloadThread.data().getDetectedVendorIndex()
+ comboProduct.currentIndex = downloadThread.data().getDetectedProductIndex(comboVendor.currentText)
+ comboDevice.currentIndex = downloadThread.data().getMatchingAddress(comboVendor.currentText, comboProduct.currentText)
+ }
+ }
}
}