From 71241c4abb6af5ab17b3c630026c835ce8c71295 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Fri, 7 Jun 2024 16:54:54 +0200 Subject: [PATCH] QmlDesigner: Fix bindings in states MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../components/propertyeditor/propertyeditorqmlbackend.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp index c397d445b19..2631246fb57 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp @@ -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