diff --git a/src/QmlControls/ParameterEditorDialog.qml b/src/QmlControls/ParameterEditorDialog.qml index 30f5698b35b2933a2a4f64d5f293f16bad36291d..d4d0775cf342fbd8e9a763848458dd173b0bb416 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 } }