aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp')
-rw-r--r--src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp b/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp
index ae7400e382..cb4b7cfe0a 100644
--- a/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp
+++ b/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp
@@ -37,6 +37,8 @@
#include <coreplugin/icore.h>
#include <coreplugin/messagebox.h>
+#include <QWidget>
+
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);