diff options
| author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2024-08-30 14:13:23 +0200 |
|---|---|---|
| committer | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2024-09-02 11:26:11 +0200 |
| commit | 379108f118865f8afc55e46d9a1c217fd30c1c11 (patch) | |
| tree | c7158a0bbf799f6fbb62f786328379f4f52de864 /src/quick/items/qquicktableview.cpp | |
| parent | f6fda66f903c9fb50d3e44f889a637279400e828 (diff) | |
QQuickTableView: ensure VerticalHeaderView stays in sync
Bacuse of a copy-paste error in QQuickTableView, TableView
would calulcate the wrong viewport rect for vertically
synced views if the views were not also synced horizontally.
The result of this mistake was that the rows in the two views
would end up with with different heights (and y pos) while
flicking.
This bug has been there for a very long time, but was hidden
becuse of anther bug that was recently fixed (25348bc0e6).
After that fix, this new bug became evident.
This patch will make sure that the offending if-test checks
the correct sync direction, and thereby also calculate the
correctly combined viewport rect.
Fixes: QTBUG-128508
Pick-to: 6.8 6.7 6.5 6.2
Change-Id: Idf4d93830933c9a28786adaba14e068015564fcc
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quick/items/qquicktableview.cpp')
| -rw-r--r-- | src/quick/items/qquicktableview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquicktableview.cpp b/src/quick/items/qquicktableview.cpp index f537b9d30d..5889e0c557 100644 --- a/src/quick/items/qquicktableview.cpp +++ b/src/quick/items/qquicktableview.cpp @@ -4962,7 +4962,7 @@ void QQuickTableViewPrivate::syncViewportRect() auto syncChild_d = syncChild->d_func(); if (syncChild_d->syncHorizontally) w = qMax(w, syncChild->width()); - if (syncChild_d->syncHorizontally) + if (syncChild_d->syncVertically) h = qMax(h, syncChild->height()); } |
