forked from qt-creator/qt-creator
QmlDesigner: Fix reflection for CheckBox
Change-Id: Ib0268e5a015fb74c6691e7b3c51ca03f1f90ba55 Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
This commit is contained in:
@@ -22,17 +22,25 @@ StudioControls.CheckBox {
|
||||
|
||||
labelColor: colorLogic.textColor
|
||||
|
||||
property bool __block: false
|
||||
|
||||
ColorLogic {
|
||||
id: colorLogic
|
||||
backendValue: checkBox.backendValue
|
||||
onValueFromBackendChanged: {
|
||||
checkBox.__block = true
|
||||
if (colorLogic.valueFromBackend !== undefined
|
||||
&& checkBox.checked !== colorLogic.valueFromBackend)
|
||||
checkBox.checked = colorLogic.valueFromBackend
|
||||
checkBox.__block = false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
onCheckedChanged: {
|
||||
if (checkBox.__block)
|
||||
return
|
||||
|
||||
if (backendValue.value !== checkBox.checked)
|
||||
backendValue.value = checkBox.checked
|
||||
}
|
||||
|
Reference in New Issue
Block a user