From 6c4e237d4b43db5c3f9dc01f8c0d3313f3bd2605 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Sun, 19 Jul 2020 16:48:31 -0400 Subject: fixed crash because items were sorted while being expanded when expanding all or updating the tree, only sort once at the end cache file types --- src/filetreeitem.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/filetreeitem.h') diff --git a/src/filetreeitem.h b/src/filetreeitem.h index 2092782e..750e4719 100644 --- a/src/filetreeitem.h +++ b/src/filetreeitem.h @@ -93,6 +93,7 @@ public: } void sort(int column, Qt::SortOrder order, bool force); + void makeSortingStale(); FileTreeItem* parent() { @@ -223,7 +224,7 @@ public: m_expanded = b; if (m_expanded && m_sortingStale) { - sort(); + queueSort(); } } @@ -314,7 +315,7 @@ private: std::wstring dataRelativeParentPath, bool isDirectory, std::wstring file); void getFileType() const; - void sort(); + void queueSort(); }; #endif // MODORGANIZER_FILETREEITEM_INCLUDED -- cgit v1.3.1