summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews/qtreeview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/itemviews/qtreeview.cpp')
-rw-r--r--src/gui/itemviews/qtreeview.cpp23
1 files changed, 4 insertions, 19 deletions
diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp
index d934683..b797776 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;
}
@@ -3424,25 +3428,6 @@ int QTreeViewPrivate::columnAt(int x) const
return header->logicalIndexAt(x);
}
-void QTreeViewPrivate::relayout(const QModelIndex &parent)
-{
- Q_Q(QTreeView);
- // do a local relayout of the items
- if (parent.isValid()) {
- int parentViewIndex = viewIndex(parent);
- if (parentViewIndex > -1 && viewItems.at(parentViewIndex).expanded) {
- collapse(parentViewIndex, false); // remove the current layout
- expand(parentViewIndex, false); // do the relayout
- q->updateGeometries();
- viewport->update();
- }
- } else {
- viewItems.clear();
- q->doItemsLayout();
- }
-}
-
-
void QTreeViewPrivate::updateScrollBars()
{
Q_Q(QTreeView);