Commit 73f335ad authored by Ismael Asensio's avatar Ismael Asensio

kwinrules: Fix binding loop on coordinate editor

Only set the model value when the user explicitly interacts
with the control.

This fixes a bug where some detected properties (position
and size) were not fully applied due to the the binding loop.
parent b53d195f
......@@ -145,7 +145,6 @@ Loader {
readonly property bool isSize: controlType == RuleItem.Size
readonly property var coord: (isSize) ? Qt.size(coordX.value, coordY.value)
: Qt.point(coordX.value, coordY.value)
onCoordChanged: valueEditor.valueEdited(coord)
QQC2.SpinBox {
id: coordX
......@@ -155,6 +154,7 @@ Loader {
from: (isSize) ? 0 : -32767
to: 32767
value: (isSize) ? ruleValue.width : ruleValue.x
onValueModified: valueEditor.valueEdited(coord)
}
QQC2.Label {
id: coordSeparator
......@@ -170,6 +170,7 @@ Loader {
Layout.preferredWidth: 50 // 50%
Layout.fillWidth: true
value: (isSize) ? ruleValue.height : ruleValue.y
onValueModified: valueEditor.valueEdited(coord)
}
}
}
......
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