diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2017-06-26 08:24:26 +0300 |
---|---|---|
committer | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2017-06-26 08:24:26 +0300 |
commit | 5f973de952ad4c763e28ac92a65d4ae66c6ee25b (patch) | |
tree | aa37a64a0a9af52c6327e9105ea3aba4aa5436d0 /share | |
parent | 59a0aeb739a7402d0dcf567bb67df4dca82bc1d5 (diff) | |
parent | 29cf39bfd6424364eeefd07e65cc0c613848ced2 (diff) | |
download | qt-creator-5f973de952ad4c763e28ac92a65d4ae66c6ee25b.tar.gz |
Merge remote-tracking branch 'origin/4.3'
Change-Id: Ib5405ed2c3356f65b49fe2f454f8ac2e0de44ef6
Diffstat (limited to 'share')
-rw-r--r-- | share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontComboBox.qml | 29 |
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++) { |