From 3682ff76d295f037cb28ee6d1b401b3dc43919a8 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Mon, 22 Aug 2022 17:11:48 +0200 Subject: [PATCH] QmlDesigner: Do not require visual node for states MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit StateGroup is no visual node. Change-Id: Ia0ff297efe2b73f42eb24e193d8e832250d77237 Reviewed-by: Qt CI Bot Reviewed-by: Henning Gründl --- src/plugins/qmldesigner/designercore/model/qmlstate.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/plugins/qmldesigner/designercore/model/qmlstate.cpp b/src/plugins/qmldesigner/designercore/model/qmlstate.cpp index da69695fefa..5a210fc13a7 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 nodes = modelNode().nodeListProperty("changes").toModelNodeList();