diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-03 13:39:22 +0100 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-03 13:39:22 +0100 |
| commit | f7647b985b791959ecdfc9896a77fa51ac784f85 (patch) | |
| tree | 370f003416a419188dd43c8acfc790f06c18d583 /src | |
| parent | 3366d9f192ef88cccc2d901c666e15061db20b4e (diff) | |
Fix ModListView::visualRect().
Diffstat (limited to 'src')
| -rw-r--r-- | src/modlistview.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/modlistview.cpp b/src/modlistview.cpp index 29c68165..e6d78bab 100644 --- a/src/modlistview.cpp +++ b/src/modlistview.cpp @@ -829,13 +829,10 @@ QRect ModListView::visualRect(const QModelIndex& index) const // this shift the visualRect() from QTreeView to match the new actual
// zone after removing indentation (see the ModListStyledItemDelegated)
QRect rect = QTreeView::visualRect(index);
- if (hasCollapsibleSeparators()) {
- if (index.isValid() && !index.model()->hasChildren(index) && index.parent().isValid()) {
- auto parentIndex = index.parent().data(ModList::IndexRole).toInt();
- if (ModInfo::getByIndex(parentIndex)->isSeparator()) {
- rect.adjust(-indentation(), 0, 0, 0);
- }
- }
+ if (hasCollapsibleSeparators()
+ && index.column() == 0 && index.isValid()
+ && index.parent().isValid()) {
+ rect.adjust(-indentation(), 0, 0, 0);
}
return rect;
}
|
