diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index f45b49ae1b9..ff4902457cb 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -1730,6 +1730,11 @@ bool EditorManagerPrivate::closeEditors(const QList &editors, CloseFla if (IDocument *document = documents.last()->document) { activateEditorForDocument(view, document, flags); } + } else { + // no documents left - set current view since view->removeEditor can + // trigger a focus change, context change, and updateActions, which + // requests the current EditorView + setCurrentView(currentView); } } }