QmlDesigner: Fix bindings in states

If a state is binding, we have to use the instance value.
qmlObjectNode.hasBindingProperty() does check if the state has a binding.
Before, we only checked the base state.

Task-number: QDS-11994
Change-Id: I70109bb359f458b3e281b0f0abff11b0e688d1df
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
(cherry picked from commit 71241c4abb)
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2024-06-07 16:54:54 +02:00
parent 11f6b6fcc9
commit 52fc3ab042

View File

@@ -324,7 +324,8 @@ void PropertyEditorQmlBackend::createPropertyEditorValue(const QmlObjectNode &qm
valueObject->setName(name); valueObject->setName(name);
valueObject->setModelNode(qmlObjectNode); valueObject->setModelNode(qmlObjectNode);
if (qmlObjectNode.propertyAffectedByCurrentState(name) && !(qmlObjectNode.modelNode().property(name).isBindingProperty())) if (qmlObjectNode.propertyAffectedByCurrentState(name)
&& !(qmlObjectNode.hasBindingProperty(name)))
valueObject->setValue(qmlObjectNode.modelValue(name)); valueObject->setValue(qmlObjectNode.modelValue(name));
else else