QmlDesigner: Always skip when condition

There is no reason to set the when condition ever.

Change-Id: I4c6b5ca04cdb7ba62f833225c6878da83a02abaf
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Thomas Hartmann
2022-08-23 17:30:00 +02:00
parent 83e1e4c2d6
commit 0e23845618

View File

@@ -89,8 +89,7 @@ void QmlStateNodeInstance::deactivateState()
void QmlStateNodeInstance::setPropertyVariant(const PropertyName &name, const QVariant &value) void QmlStateNodeInstance::setPropertyVariant(const PropertyName &name, const QVariant &value)
{ {
bool isStateOfTheRootModelNode = parentInstance() && parentInstance()->isRootNodeInstance(); if (name == "when")
if (name == "when" && (isStateOfTheRootModelNode))
return; return;
ObjectNodeInstance::setPropertyVariant(name, value); ObjectNodeInstance::setPropertyVariant(name, value);