diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-03-15 01:15:17 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-03-15 01:15:17 (GMT) |
commit | acec7123d383840d66fa63e84d0d0a0b72820496 (patch) | |
tree | 472392a2809508a83e6ab82125fe08535c05f81a /src/declarative | |
parent | f74c7f2399c0e427cdc715e09c8bac4813285627 (diff) | |
download | Qt-acec7123d383840d66fa63e84d0d0a0b72820496.zip Qt-acec7123d383840d66fa63e84d0d0a0b72820496.tar.gz Qt-acec7123d383840d66fa63e84d0d0a0b72820496.tar.bz2 |
Set maximumExtents correctly for highlightRangeMode: StrictlyEnforceRange
Task-number: QTBUG-9000
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativelistview.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 9e6a67a..e5013a9 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -2061,7 +2061,7 @@ qreal QDeclarativeListView::maxYExtent() const return height(); if (d->maxExtentDirty) { if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) - d->maxExtent = -(d->positionAt(count()-1) - d->highlightRangeEnd); + d->maxExtent = -(d->endPosition() - d->highlightRangeEnd); else d->maxExtent = -(d->endPosition() - height() + 1); if (d->footer) @@ -2098,7 +2098,7 @@ qreal QDeclarativeListView::maxXExtent() const return width(); if (d->maxExtentDirty) { if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) - d->maxExtent = -(d->positionAt(count()-1) - d->highlightRangeEnd); + d->maxExtent = -(d->endPosition() - d->highlightRangeEnd); else d->maxExtent = -(d->endPosition() - width() + 1); if (d->footer) |