Commit e4189136 authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner.PropertyEditor: Fix bug in line edit

I gave writeValueManually a proper name and added a missing check.

Task-number: QTCREATORBUG-12642
Change-Id: I67b0d7754647c29ef378d6f12f023c8a4e728cd2
Reviewed-by: default avatarTim Jenssen <tim.jenssen@digia.com>
parent b663fc95
......@@ -149,7 +149,7 @@ Column {
LineEdit {
id: textField
hasToConvertColor: true
writeValueManually: true
validator: RegExpValidator {
regExp: /#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?/g
......
......@@ -47,7 +47,7 @@ Controls.TextField {
property bool showTranslateCheckBox: true
property bool hasToConvertColor: false
property bool writeValueManually: false
property bool __dirty: false
......@@ -62,7 +62,7 @@ Controls.TextField {
id: colorLogic
backendValue: lineEdit.backendValue
onValueFromBackendChanged: {
if (hasToConvertColor) {
if (writeValueManually) {
lineEdit.text = convertColorToString(valueFromBackend)
} else {
lineEdit.text = valueFromBackend
......@@ -78,7 +78,7 @@ Controls.TextField {
Connections {
target: modelNodeBackend
onSelectionToBeChanged: {
if (__dirty) {
if (__dirty && !writeValueManually) {
lineEdit.backendValue.value = text
}
__dirty = false
......@@ -87,7 +87,7 @@ Controls.TextField {
onEditingFinished: {
if (hasToConvertColor)
if (writeValueManually)
return
if (!__dirty)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment