summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-12-13 05:46:33 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-12-13 05:46:33 (GMT)
commit047695e49afa1303d8d83c326bfeeaf01297fefe (patch)
tree4c05c843318ed11368bcd70ab5dcb620b926ef18 /src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
parent409f60f0f6fd2c2bad6125d0463c812ba1b1180a (diff)
parent18b940539d0633f30ae055feedb48aeb15969814 (diff)
downloadQt-047695e49afa1303d8d83c326bfeeaf01297fefe.zip
Qt-047695e49afa1303d8d83c326bfeeaf01297fefe.tar.gz
Qt-047695e49afa1303d8d83c326bfeeaf01297fefe.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into qtquick11
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
index 9900ff8..dd07067 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
@@ -1368,7 +1368,7 @@ void QDeclarativeVisualDataModel::_q_rowsMoved(const QModelIndex &sourceParent,
Q_D(QDeclarativeVisualDataModel);
const int count = sourceEnd - sourceStart + 1;
if (destinationParent == d->m_root && sourceParent == d->m_root) {
- _q_itemsMoved(sourceStart, destinationRow, count);
+ _q_itemsMoved(sourceStart, sourceStart > destinationRow ? destinationRow : destinationRow-1, count);
} else if (sourceParent == d->m_root) {
_q_itemsRemoved(sourceStart, count);
} else if (destinationParent == d->m_root) {