diff options
Diffstat (limited to 'share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ComboBox.qml')
-rw-r--r-- | share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ComboBox.qml | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ComboBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ComboBox.qml index 76ed79fc4d..1b2df5756b 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ComboBox.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ComboBox.qml @@ -92,7 +92,6 @@ StudioControls.ComboBox { onValueFromBackendChanged: colorLogic.invalidate() function invalidate() { - if (comboBox.block) return @@ -140,6 +139,21 @@ StudioControls.ComboBox { } } + onAccepted: { + if (!comboBox.__isCompleted) + return + + let inputValue = comboBox.editText + + let index = comboBox.find(inputValue) + if (index !== -1) + inputValue = comboBox.textAt(index) + + comboBox.backendValue.value = inputValue + + comboBox.dirty = false + } + onCompressedActivated: { if (!comboBox.__isCompleted) return |