From 26954d500bb3671f918c4819eed35e480c3f9ac3 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Mon, 23 Sep 2024 10:57:35 -0700 Subject: [PATCH] Fix combo init --- src/QmlControls/InstrumentValueEditDialog.qml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/QmlControls/InstrumentValueEditDialog.qml b/src/QmlControls/InstrumentValueEditDialog.qml index 9cf2444ab0e..9942e790c40 100644 --- a/src/QmlControls/InstrumentValueEditDialog.qml +++ b/src/QmlControls/InstrumentValueEditDialog.qml @@ -55,10 +55,10 @@ QGCPopupDialog { heading: qsTr("Telemetry") LabelledComboBox { - id: factGroupCombo - label: qsTr("Group") - model: instrumentValueData.factGroupNames - currentIndex: comboBox.find(instrumentValueData.factGroupName) + id: factGroupCombo + label: qsTr("Group") + model: instrumentValueData.factGroupNames + Component.onCompleted: currentIndex = comboBox.find(instrumentValueData.factGroupName) onActivated: (index) => { instrumentValueData.setFact(currentText, "") instrumentValueData.icon = "" @@ -74,7 +74,7 @@ QGCPopupDialog { id: factNamesCombo label: qsTr("Value") model: instrumentValueData.factValueNames - currentIndex: comboBox.find(instrumentValueData.factName) + Component.onCompleted: currentIndex = comboBox.find(instrumentValueData.factName) onActivated: (index) => { instrumentValueData.setFact(instrumentValueData.factGroupName, currentText) instrumentValueData.icon = ""