forked from qt-creator/qt-creator
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:
@@ -569,6 +569,12 @@ QList<QmlModelState> QmlObjectNode::allDefinedStates() const
|
|||||||
for (const QmlVisualNode &node : qAsConst(allVisualNodes))
|
for (const QmlVisualNode &node : qAsConst(allVisualNodes))
|
||||||
returnList.append(node.states().allStates());
|
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;
|
return returnList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user