Fixes for removing before visible
authorBea Lam <bea.lam@nokia.com>
Wed, 25 Jan 2012 07:24:05 +0000 (17:24 +1000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 1 Feb 2012 07:37:49 +0000 (08:37 +0100)
commit279e4ae7dd9c0b60c2e4dccb31363eb6bac04918
tree64da3fa74828ce2e292c9de176aaaa95bd6a22a4
parente77ea6f2fa8e98cb4a03144664a31b6070635a63
Fixes for removing before visible

Account for removing multiple items over visible and non-visible items
and calculate these using the index of the first visible item rather
than the visibleIndex (which can be above the visible position).

Also, don't take the changeBeforeVisible into account if the first
visible is already being adjusted, otherwise it moves back one more row
than it should.

Change-Id: Iea7247102e06697d10eb41301ca689c0cdc35ece
Reviewed-by: Martin Jones <martin.jones@nokia.com>
src/quick/items/qquickgridview.cpp
src/quick/items/qquickitemview.cpp
tests/auto/qtquick2/qquickgridview/data/unrequestedItems.qml
tests/auto/qtquick2/qquickgridview/tst_qquickgridview.cpp