Don't move content forwards when items are moved down
authorBea Lam <bea.lam@nokia.com>
Fri, 23 Sep 2011 01:40:25 +0000 (11:40 +1000)
committerQt by Nokia <qt-info@nokia.com>
Sun, 2 Oct 2011 23:38:02 +0000 (01:38 +0200)
commit54da515e5e5f65e7ae253280038aad912780de12
tree183f92b4978b613db9fb139b87a8ad3d4019de3b
parent3176222ad06478b3aae752f59e14d63ffcd952c7
Don't move content forwards when items are moved down

Previously, if items moved down within a view, the content position
would effectively drop down. E.g. for a (0,5,3) move that moved 3
items from 0 to 5, the content y would move to the position of index
3, since it became the new first item. However, this makes it
difficult to move transitions for move() operations in these cases
since these items do not move (since the content position moves
instead). With this fix, the content position does not move, and items
will always move if they are moved.

Note this behaviour was previously implemented for backwards
movements, e.g. a (5,0,3) move but was not enabled for a forwards
(0,5,3) move.

Change-Id: I1c5a19e3c36347a4aa0cf6e31c975967a7eeada9
Reviewed-on: http://codereview.qt-project.org/5576
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
src/declarative/items/qsggridview.cpp
src/declarative/items/qsgitemview.cpp
src/declarative/items/qsglistview.cpp
tests/auto/declarative/qsggridview/tst_qsggridview.cpp
tests/auto/declarative/qsglistview/tst_qsglistview.cpp