aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorDan Vrátil <dan@progdan.cz>2014-07-29 11:11:11 +0200
committerAlbert Astals Cid <albert.astals@canonical.com>2014-07-30 13:17:35 +0200
commit47ffb30a69285d6ced1287f14ff5842a298e60e0 (patch)
tree9f83fcf67d3d0baa9400a0452bd867000a959a97 /src/qml
parent872008a0e053d739636e4ad8ecbbc941b3fdc99d (diff)
Fix QQmlDelegateModel getting out of sync
Fixes a regression introduced by a0aefe1, which caused that the source data model and adaptorModel could sometimes get out of sync. Change-Id: Ia6b5fc380cc6cf6549ae857e6da54e088a5dadb5 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/types/qqmldelegatemodel.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp
index 4591d42710..23bdeb55b2 100644
--- a/src/qml/types/qqmldelegatemodel.cpp
+++ b/src/qml/types/qqmldelegatemodel.cpp
@@ -1558,12 +1558,7 @@ void QQmlDelegateModel::_q_layoutChanged(const QList<QPersistentModelIndex> &par
if (i == index.row())
continue;
- QVector<Compositor::Insert> inserts;
- QVector<Compositor::Remove> removes;
- d->m_compositor.listItemsMoved(&d->m_adaptorModel, i, index.row(), 1, &removes, &inserts);
- if (!removes.isEmpty() || !inserts.isEmpty()) {
- d->itemsMoved(removes, inserts);
- }
+ _q_itemsMoved(i, index.row(), 1);
}
d->m_storedPersistentIndexes.clear();