summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/declarative/util/qmllistmodel.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/declarative/util/qmllistmodel.cpp b/src/declarative/util/qmllistmodel.cpp
index 345bc3b..69bed25 100644
--- a/src/declarative/util/qmllistmodel.cpp
+++ b/src/declarative/util/qmllistmodel.cpp
@@ -499,6 +499,9 @@ void QmlListModel::move(int from, int to, int n)
{
if (from+n > count() || to+n > count() || n==0 || from==to || from < 0 || to < 0)
return;
+ int origfrom=from; // preserve actual move, so any animations are correct
+ int origto=to;
+ int orign=n;
if (from > to) {
// Only move forwards - flip if backwards moving
int tfrom = from;
@@ -524,7 +527,7 @@ void QmlListModel::move(int from, int to, int n)
for (; f != replaced.end(); ++f, ++t)
*t = *f;
}
- emit itemsMoved(from,to,n);
+ emit itemsMoved(origfrom,origto,orign);
}
/*!