aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Hartmann <thomas.hartmann@qt.io>2019-06-12 16:37:26 +0200
committerThomas Hartmann <thomas.hartmann@qt.io>2019-06-14 12:31:02 +0000
commit55eb0587ef65782561c8020801cad159e5dfe6e3 (patch)
tree4323763b0358860dc419eba8fc293cf87eae1d51
parent31c9171a658622723c4a47ceab0c8e22cb997c51 (diff)
QmlDesigner: reset state editor model when error occurs
Task-number: QDS-695 Change-Id: I1e2e454c31eb92e865ccec9f7d68c5142488ddf9 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
-rw-r--r--src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp b/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp
index 07e758b35a..ae7400e382 100644
--- a/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp
+++ b/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp
@@ -185,6 +185,7 @@ void StatesEditorModel::renameState(int internalNodeId, const QString &newName)
newName.isEmpty() ?
tr("The empty string as a name is reserved for the base state.") :
tr("Name already used in another state"));
+ reset();
} else {
m_statesEditorView->renameState(internalNodeId, newName);
}