QmlDesigner: Take StageGroup into account in allDefinedStates

Since we add support StateGroups we also have to take them here.

Change-Id: I54a897e6edc4677e90ea64dd5c7334fc76a8f36f
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-09-14 15:55:19 +02:00
parent ec1905c6fa
commit 620712ed66

View File

@@ -569,6 +569,12 @@ QList<QmlModelState> QmlObjectNode::allDefinedStates() const
for (const QmlVisualNode &node : qAsConst(allVisualNodes))
returnList.append(node.states().allStates());
const auto allNodes = view()->allModelNodes();
for (const ModelNode &node : allNodes) {
if (node.simplifiedTypeName() == "StateGroup")
returnList.append(QmlModelStateGroup(node).allStates());
}
return returnList;
}