diff options
Diffstat (limited to 'src/gui/itemviews/qtreeview.cpp')
-rw-r--r-- | src/gui/itemviews/qtreeview.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp index d934683..c3ff2bd 100644 --- a/src/gui/itemviews/qtreeview.cpp +++ b/src/gui/itemviews/qtreeview.cpp @@ -3194,12 +3194,16 @@ void QTreeViewPrivate::layout(int i, bool recursiveExpanding, bool afterIsUninit int QTreeViewPrivate::pageUp(int i) const { int index = itemAtCoordinate(coordinateForItem(i) - viewport->height()); + while (isItemHiddenOrDisabled(index)) + index--; return index == -1 ? 0 : index; } int QTreeViewPrivate::pageDown(int i) const { int index = itemAtCoordinate(coordinateForItem(i) + viewport->height()); + while (isItemHiddenOrDisabled(index)) + index++; return index == -1 ? viewItems.count() - 1 : index; } |