diff options
author | Thomas Hartmann <thomas.hartmann@qt.io> | 2022-08-22 17:11:48 +0200 |
---|---|---|
committer | Thomas Hartmann <thomas.hartmann@qt.io> | 2022-08-23 08:00:51 +0000 |
commit | 3682ff76d295f037cb28ee6d1b401b3dc43919a8 (patch) | |
tree | 42f4401ce1b097da6b1af01b5235f3e3fa8d46dd | |
parent | 179713ed5cfd2a1b5f9cee0ba865789e4b6fb2d7 (diff) |
QmlDesigner: Do not require visual node for states
StateGroup is no visual node.
Change-Id: Ia0ff297efe2b73f42eb24e193d8e832250d77237
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
-rw-r--r-- | src/plugins/qmldesigner/designercore/model/qmlstate.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/plugins/qmldesigner/designercore/model/qmlstate.cpp b/src/plugins/qmldesigner/designercore/model/qmlstate.cpp index da69695fef..5a210fc13a 100644 --- a/src/plugins/qmldesigner/designercore/model/qmlstate.cpp +++ b/src/plugins/qmldesigner/designercore/model/qmlstate.cpp @@ -274,9 +274,6 @@ QmlModelState QmlModelState::duplicate(const QString &name) const if (!isValid()) throw new InvalidModelNodeException(__LINE__, __FUNCTION__, __FILE__); - if (!QmlVisualNode::isValidQmlVisualNode(modelNode().parentProperty().parentModelNode())) - throw new InvalidModelNodeException(__LINE__, __FUNCTION__, __FILE__); - // QmlModelState newState(stateGroup().addState(name)); QmlModelState newState(createQmlState(view(), {{PropertyName("name"), QVariant(name)}})); const QList<ModelNode> nodes = modelNode().nodeListProperty("changes").toModelNodeList(); |