From 1b042a225c543fd06a6fdcd74e1fa3b48683270f Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 19 Nov 2009 09:52:34 +0100 Subject: reset 'busy' cursor if editor could not be created (cherry picked from commit 1d0758d8b1f0816e9b45a70bcdb3896da0f1bc8d) --- src/plugins/coreplugin/editormanager/editormanager.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index 39271a21675..21f032904c7 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; -- cgit v1.2.3