summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontComboBox.qml29
1 files changed, 26 insertions, 3 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontComboBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontComboBox.qml
index ffc774d7cd..6cca085da7 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontComboBox.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontComboBox.qml
@@ -58,12 +58,28 @@ Controls.ComboBox {
Layout.fillWidth: true
- onCurrentTextChanged: {
+ onAccepted: {
if (backendValue === undefined)
return;
- if (backendValue.value !== currentText)
- backendValue.value = currentText;
+ if (editText === "")
+ return
+
+ if (backendValue.value !== editText)
+ backendValue.value = editText;
+ }
+
+ onActivated: {
+ if (backendValue === undefined)
+ return;
+
+ if (editText === "")
+ return
+
+ var indexText = comboBox.textAt(index)
+
+ if (backendValue.value !== indexText)
+ backendValue.value = indexText;
}
ExtendedFunctionButton {
@@ -73,6 +89,13 @@ Controls.ComboBox {
visible: comboBox.enabled
}
+ Connections {
+ target: modelNodeBackend
+ onSelectionChanged: {
+ comboBox.editText = backendValue.value
+ }
+ }
+
Component.onCompleted: {
//Hack to style the text input
for (var i = 0; i < comboBox.children.length; i++) {