From 16c7cc5605d4e71f509acfcb4881df833de11853 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Fri, 10 Jul 2020 13:58:58 -0400 Subject: fixed ensureFullyLoaded() taking forever because it was queuing all the sorts unnecessarily --- src/filetreemodel.cpp | 9 +++++++-- src/filetreemodel.h | 2 ++ src/organizer_en.ts | 24 ++++++++++++------------ 3 files changed, 21 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/filetreemodel.cpp b/src/filetreemodel.cpp index cf5bc665..11901c43 100644 --- a/src/filetreemodel.cpp +++ b/src/filetreemodel.cpp @@ -226,7 +226,7 @@ void FileTreeModel::clear() void FileTreeModel::recursiveFetchMore(const QModelIndex& m) { if (canFetchMore(m)) { - fetchMore(m); + doFetchMore(m, false); } for (int i=0; idataRelativeParentPath(); - update(*item, *parentEntry, parentPath.toStdWString(), true); + update(*item, *parentEntry, parentPath.toStdWString(), forFetch); } QVariant FileTreeModel::data(const QModelIndex& index, int role) const diff --git a/src/filetreemodel.h b/src/filetreemodel.h index 8d3af5f7..334a0577 100644 --- a/src/filetreemodel.h +++ b/src/filetreemodel.h @@ -113,6 +113,8 @@ private: FileTreeItem& parentItem, const MOShared::DirectoryEntry& parentEntry, const std::wstring& parentPath, bool forFetching); + void doFetchMore(const QModelIndex& parent, bool forFetch); + void queueRemoveItem(FileTreeItem* item); void removeItems(); diff --git a/src/organizer_en.ts b/src/organizer_en.ts index 964d032f..c5726013 100644 --- a/src/organizer_en.ts +++ b/src/organizer_en.ts @@ -1462,54 +1462,54 @@ Right now the only case I know of where this needs to be overwritten is for the FileTreeModel - + Name - + Mod - + Type - + Size - + Date modified - + Directory - - + + Virtual path - + Real path - + From - - + + Also in -- cgit v1.3.1