summaryrefslogtreecommitdiff
path: root/src/filetreemodel.h
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2020-07-19 16:48:31 -0400
committerisanae <14251494+isanae@users.noreply.github.com>2020-07-19 16:48:31 -0400
commit6c4e237d4b43db5c3f9dc01f8c0d3313f3bd2605 (patch)
tree7613427fe55d29abe21a11810ff355f84bdb31e7 /src/filetreemodel.h
parentd32250597abf3139268ec3480af9a1fadcf0d18e (diff)
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
Diffstat (limited to 'src/filetreemodel.h')
-rw-r--r--src/filetreemodel.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/filetreemodel.h b/src/filetreemodel.h
index 334a0577..4894e4be 100644
--- a/src/filetreemodel.h
+++ b/src/filetreemodel.h
@@ -61,6 +61,10 @@ public:
bool enabled() const;
void setEnabled(bool b);
+ void aboutToExpandAll();
+ void expandedAll();
+
+
const SortInfo& sortInfo() const;
QModelIndex index(int row, int col, const QModelIndex& parent={}) const override;
@@ -77,6 +81,7 @@ public:
FileTreeItem* itemFromIndex(const QModelIndex& index) const;
void sortItem(FileTreeItem& item, bool force);
+ void queueSortItem(FileTreeItem* item);
private:
class Range;
@@ -92,11 +97,12 @@ private:
mutable QTimer m_iconPendingTimer;
SortInfo m_sort;
bool m_fullyLoaded;
+ bool m_sortingEnabled;
// see top of filetreemodel.cpp
std::vector<FileTreeItem*> m_removeItems;
- QTimer m_removeTimer;
std::vector<FileTreeItem*> m_sortItems;
+ QTimer m_removeTimer;
QTimer m_sortTimer;
@@ -118,7 +124,6 @@ private:
void queueRemoveItem(FileTreeItem* item);
void removeItems();
- void queueSortItem(FileTreeItem* item);
void sortItems();