forked from qt-creator/qt-creator
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:
@@ -1730,6 +1730,11 @@ bool EditorManagerPrivate::closeEditors(const QList<IEditor*> &editors, CloseFla
|
|||||||
if (IDocument *document = documents.last()->document) {
|
if (IDocument *document = documents.last()->document) {
|
||||||
activateEditorForDocument(view, document, flags);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user