diff options
author | Eike Ziller <eike.ziller@qt.io> | 2018-03-08 17:41:14 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2018-03-12 09:09:47 +0000 |
commit | 64fe131c142377821a1e38671e5684946616a33f (patch) | |
tree | 7f50a304f84cb7fcd2c6a35f65dc8f2b10006fcf | |
parent | 102a058c2517621a758730bd47389f914d4a8c8a (diff) | |
download | qt-creator-64fe131c142377821a1e38671e5684946616a33f.tar.gz |
Fix ordering of items without file name in open documents popup
An item that has no file name (like Git Commit, Diff etc.) was always
last in the list.
Broke by 324de13b4e6703db778010d0682ac26cff359516.
Change-Id: Ied3add2a372b4b176ee800e8c023c3cef5495488
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
-rw-r--r-- | src/plugins/coreplugin/editormanager/editorview.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/coreplugin/editormanager/editorview.cpp b/src/plugins/coreplugin/editormanager/editorview.cpp index 4d6dc67623..9848b30ab1 100644 --- a/src/plugins/coreplugin/editormanager/editorview.cpp +++ b/src/plugins/coreplugin/editormanager/editorview.cpp @@ -270,7 +270,8 @@ void EditorView::updateEditorHistory(IEditor *editor, QList<EditLocation> &histo for (int i = 0; i < history.size(); ++i) { const EditLocation &item = history.at(i); if (item.document == document - || !DocumentModel::indexOfFilePath(FileName::fromString(item.fileName))) { + || (!item.document + && !DocumentModel::indexOfFilePath(FileName::fromString(item.fileName)))) { history.removeAt(i--); } } |