Editors: Fix another soft assert about current view

Task-number: QTCREATORBUG-24869
Change-Id: I575153a909f398ade4dce4edbb4927ea0d35c20f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Eike Ziller
2021-03-16 13:10:53 +01:00
parent 1f3cd3c70f
commit 65d2f87f6c

View File

@@ -1730,6 +1730,11 @@ bool EditorManagerPrivate::closeEditors(const QList<IEditor*> &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);
}
}
}