aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickitemview_p_p.h
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2012-04-11 16:22:52 +1000
committerQt by Nokia <qt-info@nokia.com>2012-04-13 08:07:16 +0200
commit96c0e7e576b4b9a31bf7df362e26ebbc64f726f9 (patch)
tree0cae848593288b6db2c304a323aeb84671e33a80 /src/quick/items/qquickitemview_p_p.h
parentf24f682c83ee08f1ceffc935def477e8a649e38a (diff)
Don't ignore model changes when the ListView scroll position changes.
If there are pending changes when the ListView viewport changes then do a full layout instead of a refill. Likewise for GridView and when animations finish or the cacheBuffer size changes. Change-Id: I57a2b01fee5729381558af366dad24ba26c223ef Reviewed-by: Bea Lam <bea.lam@nokia.com>
Diffstat (limited to 'src/quick/items/qquickitemview_p_p.h')
-rw-r--r--src/quick/items/qquickitemview_p_p.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/quick/items/qquickitemview_p_p.h b/src/quick/items/qquickitemview_p_p.h
index e352c461d6..1e29faf10f 100644
--- a/src/quick/items/qquickitemview_p_p.h
+++ b/src/quick/items/qquickitemview_p_p.h
@@ -229,6 +229,19 @@ public:
hData.markExtentsDirty();
}
+ bool hasPendingChanges() const {
+ return currentChanges.hasPendingChanges()
+ || bufferedChanges.hasPendingChanges()
+ ||runDelayedRemoveTransition;
+ }
+
+ void refillOrLayout() {
+ if (hasPendingChanges())
+ layout();
+ else
+ refill();
+ }
+
QQmlGuard<QQuickVisualModel> model;
QVariant modelVariant;
int itemCount;