Skip to content

Commit 0e8fe6e

Browse files
Romain Mardulynmatthias
authored andcommitted
WT-13786: Fix WTableView::scrollTo() not scrolling
Fixes WTableView::scrollTo() considering the line just after the last one visible to be visible due checking if the top of the line was visible.
1 parent 6069045 commit 0e8fe6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Wt/WTableView.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2109,7 +2109,7 @@ void WTableView::scrollTo(const WModelIndex& index, ScrollHint hint)
21092109

21102110
if (viewportHeight_ != UNKNOWN_VIEWPORT_HEIGHT) {
21112111
if (hint == ScrollHint::EnsureVisible) {
2112-
if (viewportTop_ + viewportHeight_ < rowY)
2112+
if (viewportTop_ + viewportHeight_ < rowY + rh)
21132113
hint = ScrollHint::PositionAtTop;
21142114
else if (rowY < viewportTop_)
21152115
hint = ScrollHint::PositionAtBottom;

0 commit comments

Comments
 (0)