QmlDesigner: Remove ko statement if changing type

Change-Id: I28a0e796e3f3da0da584e1b8e58c8821f2777d61
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
This commit is contained in:
Thomas Hartmann
2023-09-20 19:30:41 +02:00
parent 3f1baa7519
commit 93b1c18aeb

View File

@@ -737,6 +737,11 @@ void ConnectionModelBackendDelegate::changeActionType(ActionType actionType)
ConnectionEditorStatements::MatchedStatement &okStatement
= ConnectionEditorStatements::okStatement(m_handler);
ConnectionEditorStatements::MatchedStatement &koStatement
= ConnectionEditorStatements::koStatement(m_handler);
koStatement = ConnectionEditorStatements::EmptyBlock();
//We expect a valid id on the root node
const QString validId = model->connectionView()->rootModelNode().validId();
QString statementSource = generateDefaultStatement(actionType, validId);