QmlDesigner: Allow setting state property

This has to be blocked only for the root item.

Task-number: QDS-1979
Change-Id: Ia05255468623fe715e3f7172e2f058a70629b783
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Thomas Hartmann
2020-04-21 08:10:08 +02:00
parent 0c94ab724a
commit 74ffff63eb
@@ -611,8 +611,8 @@ void QuickItemNodeInstance::setPropertyVariant(const PropertyName &name, const Q
if (ignoredProperties().contains(name))
return;
if (name == "state")
return; // states are only set by us
if (name == "state" && isRootNodeInstance())
return; // states on the root item are only set by us
if (name == "height") {
m_height = value.toDouble();
@@ -649,8 +649,8 @@ void QuickItemNodeInstance::setPropertyBinding(const PropertyName &name, const Q
if (ignoredProperties().contains(name))
return;
if (name == "state")
return; // states are only set by us
if (name == "state" && isRootNodeInstance())
return; // states on the root item are only set by us
if (name.startsWith("anchors.") && isRootNodeInstance())
return;