forked from qt-creator/qt-creator
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 324de13b4e
.
Change-Id: Ied3add2a372b4b176ee800e8c023c3cef5495488
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -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--);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user