QmlDesigner: reset state editor model when error occurs

Task-number: QDS-695
Change-Id: I1e2e454c31eb92e865ccec9f7d68c5142488ddf9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Thomas Hartmann
2019-06-12 16:37:26 +02:00
parent 31c9171a65
commit 55eb0587ef

View File

@@ -185,6 +185,7 @@ void StatesEditorModel::renameState(int internalNodeId, const QString &newName)
newName.isEmpty() ? newName.isEmpty() ?
tr("The empty string as a name is reserved for the base state.") : tr("The empty string as a name is reserved for the base state.") :
tr("Name already used in another state")); tr("Name already used in another state"));
reset();
} else { } else {
m_statesEditorView->renameState(internalNodeId, newName); m_statesEditorView->renameState(internalNodeId, newName);
} }