diff options
author | Bea Lam <bea.lam@nokia.com> | 2011-08-29 06:35:23 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2011-08-29 06:35:23 (GMT) |
commit | b64817858484db6e7c280d41ed81d4c87dff2275 (patch) | |
tree | b8bab6fd67f083e37dad4e459aca3bd79071953d /src/declarative/graphicsitems | |
parent | c1491c356f3cca92a359468ce37f38bc1873eec4 (diff) | |
download | Qt-b64817858484db6e7c280d41ed81d4c87dff2275.zip Qt-b64817858484db6e7c280d41ed81d4c87dff2275.tar.gz Qt-b64817858484db6e7c280d41ed81d4c87dff2275.tar.bz2 |
Fix conversion of QAbstractItemModel::rowsMoved() parameters
VisualDataModel was emitting itemsMoved() signal with incorrect
"to" value when multiple items were moved forwards.
Reviewed-by: Martin Jones
Diffstat (limited to 'src/declarative/graphicsitems')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp index 26757b5..b896a77 100644 --- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp @@ -1375,7 +1375,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, sourceStart > destinationRow ? destinationRow : destinationRow-1, count); + _q_itemsMoved(sourceStart, sourceStart > destinationRow ? destinationRow : destinationRow-count, count); } else if (sourceParent == d->m_root) { _q_itemsRemoved(sourceStart, count); } else if (destinationParent == d->m_root) { |