diff options
author | Pierre Rossi <pierre.rossi@digia.com> | 2012-11-19 21:15:19 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-23 00:47:48 +0100 |
commit | b77749e9973da2199029f1271e55d8b42c0e7d2e (patch) | |
tree | 760c8de0925d5ba42a320d61072c84ae4ed137ab /src/widgets/itemviews/qlistview.cpp | |
parent | e73ac39c996a3b17b3e42f3f30ae2c3b882a5235 (diff) |
Account for the item spacing when using QListView::scrollTo()
Somehow this bug managed to stay hidden until the introduction
of QFusionStyle.
Task-number: QTBUG-27675
Change-Id: I86b049b869e9f2951426dc67a485ad7c60ef1403
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src/widgets/itemviews/qlistview.cpp')
-rw-r--r-- | src/widgets/itemviews/qlistview.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/itemviews/qlistview.cpp b/src/widgets/itemviews/qlistview.cpp index 592354836a..63412506cc 100644 --- a/src/widgets/itemviews/qlistview.cpp +++ b/src/widgets/itemviews/qlistview.cpp @@ -2546,6 +2546,7 @@ int QListModeViewBase::perItemScrollToValue(int index, int scrollValue, int view if (index < 0) return scrollValue; + itemExtent += spacing(); QVector<int> visibleFlowPositions; visibleFlowPositions.reserve(flowPositions.count() - 1); for (int i = 0; i < flowPositions.count() - 1; i++) { // flowPositions count is +1 larger than actual row count |