diff --git a/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp b/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp index ae7400e3825..cb4b7cfe0a7 100644 --- a/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp +++ b/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp @@ -37,6 +37,8 @@ #include #include +#include + enum { debug = false }; @@ -181,10 +183,11 @@ void StatesEditorModel::renameState(int internalNodeId, const QString &newName) return; if (newName.isEmpty() ||! m_statesEditorView->validStateName(newName)) { - Core::AsynchronousMessageBox::warning(tr("Invalid state name"), + auto w = Core::AsynchronousMessageBox::warning(tr("Invalid state name"), newName.isEmpty() ? tr("The empty string as a name is reserved for the base state.") : tr("Name already used in another state")); + w->setAttribute(Qt::WA_ShowModal, false); reset(); } else { m_statesEditorView->renameState(internalNodeId, newName);