diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-07 21:46:58 +0100 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-10 10:27:30 +0100 |
| commit | 7d9fa5e4f96840321ff996b4c637b7cd686c3570 (patch) | |
| tree | d078e7264f80edafe0e05360edaa3fb6d79a990f /src/modlistbypriorityproxy.h | |
| parent | fc60ea5b7a023493375a6fced6572156f48e36c3 (diff) | |
Fix drop below collapsed separator.
Diffstat (limited to 'src/modlistbypriorityproxy.h')
| -rw-r--r-- | src/modlistbypriorityproxy.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/modlistbypriorityproxy.h b/src/modlistbypriorityproxy.h index 6b48678a..c64a7973 100644 --- a/src/modlistbypriorityproxy.h +++ b/src/modlistbypriorityproxy.h @@ -16,6 +16,7 @@ #include "modlistview.h" class ModList; +class ModListDropInfo; class Profile; class ModListByPriorityProxy : public QAbstractProxyModel @@ -46,7 +47,7 @@ public: public slots: - void onDropEnter(const QMimeData* data, ModListView::DropPosition dropPosition); + void onDropEnter(const QMimeData* data, bool dropExpanded, ModListView::DropPosition dropPosition); protected slots: @@ -54,6 +55,11 @@ protected slots: private: + // returns a pair of boolean, the first one indicates if the drop info + // contains separators, the first one if the first row is a separator + // + std::pair<bool, bool> dropSeparators(const ModListDropInfo& dropInfo) const; + void buildTree(); struct TreeItem { @@ -83,6 +89,8 @@ private: private: OrganizerCore& m_core; Profile* m_profile; + + bool m_dropExpanded = false; ModListView::DropPosition m_dropPosition = ModListView::DropPosition::OnItem; }; |
