QmlDesigner: Ignore "when" property for all states

We actually did set the "when" property for StateGroups.

Change-Id: I45a1663d60f8f443b4deafa529d1fd2788a8459e
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Thomas Hartmann
2022-09-15 10:12:39 +02:00
parent 3ce5af7a79
commit 4bf105b662

View File

@@ -97,9 +97,7 @@ void QmlStateNodeInstance::setPropertyVariant(const PropertyName &name, const QV
void QmlStateNodeInstance::setPropertyBinding(const PropertyName &name, const QString &expression)
{
bool isStateOfTheRootModelNode = parentInstance() && parentInstance()->isRootNodeInstance();
if (name == "when" && (isStateOfTheRootModelNode))
if (name == "when")
return;
ObjectNodeInstance::setPropertyBinding(name, expression);