From 7dc069c8cf705524b465770ad52d3fde104d2fc1 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Thu, 14 Jan 2016 18:56:02 -0800 Subject: [PATCH] Combo box showing incorrect value --- src/QmlControls/ParameterEditorDialog.qml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/QmlControls/ParameterEditorDialog.qml b/src/QmlControls/ParameterEditorDialog.qml index 30f5698b3..d4d0775cf 100644 --- a/src/QmlControls/ParameterEditorDialog.qml +++ b/src/QmlControls/ParameterEditorDialog.qml @@ -100,13 +100,15 @@ QGCViewDialog { QGCComboBox { id: factCombo width: valueField.width - visible: fact.enumStrings.length != 0 && !validate + visible: _showCombo model: fact.enumStrings + property bool _showCombo: fact.enumStrings.length != 0 && !validate + Component.onCompleted: { // We can't bind directly to fact.enumIndex since that would add an unknown value // if there are no enum strings. - if (visible) { + if (_showCombo) { currentIndex = fact.enumIndex } } -- 2.22.0