Fix content position for key navigation with StrictlyEnforceRange
authorBea Lam <bea.lam@nokia.com>
Mon, 1 Aug 2011 06:56:45 +0000 (16:56 +1000)
committerQt by Nokia <qt-info@nokia.com>
Tue, 2 Aug 2011 06:50:21 +0000 (08:50 +0200)
commit29e71ca376f48bafc2105b656a702f3edd4501a8
treefbc9ec4a98a3dbec386ab0c52748270906750306
parentbc516180e841a9dc3c3ea95ad968e743e48ad319
Fix content position for key navigation with StrictlyEnforceRange

If a ListView had highlight ranges and StrictlyEnforceRange, but no
highlight item, the content would not move to the correct position
when incrementCurrentIndex() and decrementCurrentIndex() were invoked.

trackedPositionChanged() shouldn't take the current section pos into
account because this is already calculated by FxListItemSG::position()
(this wasn't the case when the code in trackedPositionChanged() was
originally written).

Task-number: QTBUG-20287
Change-Id: I1624b5afd1efbe27630349143b7af2b486cfa260
Reviewed-on: http://codereview.qt.nokia.com/2429
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bea Lam <bea.lam@nokia.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
src/declarative/items/qsgitemview.cpp
src/qtquick1/graphicsitems/qdeclarativelistview.cpp
tests/auto/declarative/qsglistview/data/listview-enforcerange-nohighlight.qml [new file with mode: 0644]
tests/auto/declarative/qsglistview/tst_qsglistview.cpp