diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-04-09 01:41:18 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-04-09 01:41:18 (GMT) |
commit | 5405740678314389e6e5477a3ed76819a60aeb37 (patch) | |
tree | cb1110f200bdd4ff6976d61ca438a5585b953b95 /src | |
parent | bb07e7d2f4f3e8940ebcc12334b4b723e450d374 (diff) | |
download | Qt-5405740678314389e6e5477a3ed76819a60aeb37.zip Qt-5405740678314389e6e5477a3ed76819a60aeb37.tar.gz Qt-5405740678314389e6e5477a3ed76819a60aeb37.tar.bz2 |
Ensure GridView content position is stable when moving items.
Task-number: QTBUG-9697
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativegridview.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index f832f12..9be025a 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -2166,6 +2166,8 @@ void QDeclarativeGridView::itemsMoved(int from, int to, int count) if (!movedItem) movedItem = d->createItem(item->index); it = d->visibleItems.insert(it, movedItem); + if (it == d->visibleItems.begin() && firstItem) + movedItem->setPosition(firstItem->colPos(), firstItem->rowPos()); ++it; --remaining; } else { |