summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-04-09 01:41:18 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-04-09 01:41:18 (GMT)
commit5405740678314389e6e5477a3ed76819a60aeb37 (patch)
treecb1110f200bdd4ff6976d61ca438a5585b953b95 /src/declarative/graphicsitems
parentbb07e7d2f4f3e8940ebcc12334b4b723e450d374 (diff)
downloadQt-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/declarative/graphicsitems')
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp2
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 {