diff options
author | hjk <qtc-committer@nokia.com> | 2009-11-19 09:52:34 +0100 |
---|---|---|
committer | con <qtc-committer@nokia.com> | 2009-11-19 18:35:10 +0100 |
commit | 1b042a225c543fd06a6fdcd74e1fa3b48683270f (patch) | |
tree | 759a209cbef1b22a237903f77eedb4c2980660b7 | |
parent | 2d620c2ee693f9de0b2743c969c3a4208082d498 (diff) |
reset 'busy' cursor if editor could not be created
(cherry picked from commit 1d0758d8b1f0816e9b45a70bcdb3896da0f1bc8d)
-rw-r--r-- | src/plugins/coreplugin/editormanager/editormanager.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index 39271a2167..21f032904c 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -1201,10 +1201,12 @@ IEditor *EditorManager::openEditorWithContents(const QString &editorKind, QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); IEditor *edt = createEditor(editorKind); - if (!edt) + if (!edt) { + QApplication::restoreOverrideCursor(); return 0; + } - if (!edt || !edt->createNew(contents)) { + if (!edt->createNew(contents)) { QApplication::restoreOverrideCursor(); delete edt; edt = 0; |