summaryrefslogtreecommitdiffstats
path: root/src/declarative/fx
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-09-08 05:25:32 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-09-08 05:25:32 (GMT)
commitb9a924a1e77faeeba595d0619afb14e8fdbb2dd4 (patch)
treefc7e6928ef40399f8ac71342ef53ab650ce5c417 /src/declarative/fx
parent94267bb148fe4c991a10d4aa4c01373821d9216e (diff)
downloadQt-b9a924a1e77faeeba595d0619afb14e8fdbb2dd4.zip
Qt-b9a924a1e77faeeba595d0619afb14e8fdbb2dd4.tar.gz
Qt-b9a924a1e77faeeba595d0619afb14e8fdbb2dd4.tar.bz2
Current Item was moved twice when an item was inserted before it.
Diffstat (limited to 'src/declarative/fx')
-rw-r--r--src/declarative/fx/qfxlistview.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/declarative/fx/qfxlistview.cpp b/src/declarative/fx/qfxlistview.cpp
index c24610f..6c0a83e 100644
--- a/src/declarative/fx/qfxlistview.cpp
+++ b/src/declarative/fx/qfxlistview.cpp
@@ -1507,7 +1507,8 @@ void QFxListView::itemsInserted(int modelIndex, int count)
// Update the indexes of the following visible items.
for (; index < d->visibleItems.count(); ++index) {
FxListItem *listItem = d->visibleItems.at(index);
- listItem->setPosition(listItem->position() + (pos - initialPos));
+ if (listItem->item != d->currentItem->item)
+ listItem->setPosition(listItem->position() + (pos - initialPos));
if (listItem->index != -1)
listItem->index += count;
}