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>
This commit is contained in:
Thomas Hartmann
2024-06-07 16:54:54 +02:00
parent b7131bbd30
commit 71241c4abb

View File

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