diff options
author | Christiaan Janssen <christiaan.janssen@nokia.com> | 2010-03-05 17:22:27 +0100 |
---|---|---|
committer | Christiaan Janssen <christiaan.janssen@nokia.com> | 2010-03-05 17:22:27 +0100 |
commit | 155296b0701c443afb6358c2e09557350e6aadab (patch) | |
tree | 01f1a85814f970f9d5a634ef78944377e12d4e70 /src/plugins/qmldesigner/components/stateseditor/stateslist.qml | |
parent | ac030f6d9d3d45ea5fc59ef710aeb34b962a0ebb (diff) |
QmlDesigner.StatesEditor: Showing message box when wrong state name is entered
Diffstat (limited to 'src/plugins/qmldesigner/components/stateseditor/stateslist.qml')
-rw-r--r-- | src/plugins/qmldesigner/components/stateseditor/stateslist.qml | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/plugins/qmldesigner/components/stateseditor/stateslist.qml b/src/plugins/qmldesigner/components/stateseditor/stateslist.qml index ca6585b2aa..af892cb491 100644 --- a/src/plugins/qmldesigner/components/stateseditor/stateslist.qml +++ b/src/plugins/qmldesigner/components/stateseditor/stateslist.qml @@ -360,9 +360,10 @@ Rectangle { border.color:"#4f4f4f" radius:4 function unFocus() { - if (visible) + if (visible) { + visible=false; statesEditorModel.renameState(index,stateNameInput.text); - visible=false; + } } // There is no QFontMetrics equivalent in QML @@ -399,8 +400,10 @@ Rectangle { x = -cM; } onAccepted: { - statesEditorModel.renameState(index,text); - stateNameEditor.visible=false; + if (stateNameEditor.visible) { + stateNameEditor.visible=false; + statesEditorModel.renameState(index,text); + } } } } |