diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2012-05-25 11:41:17 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-28 05:30:34 +0200 |
commit | 2533a40cf26ded5b777aae6b3c49813a044ab735 (patch) | |
tree | dc58ecb893b0049dba16b4926bc211fb8874ae5f /src/quick/items/qquickpathview.cpp | |
parent | d4dad3a0b83c921ed4d746eb9694be8b008bcc1a (diff) |
Fix PathView not updating after all items are removed from the model.
Always clear the layoutScheduled flag on a refill even if there are no
items to create, otherwise future layouts won't be scheduled because
it appears one is already pending.
Fixes an issue in the dragselection example where items that should
have moved to the PathView instead disappeared.
Change-Id: I4302b5b43184c697a78f5c09dc3811326e2271ca
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src/quick/items/qquickpathview.cpp')
-rw-r--r-- | src/quick/items/qquickpathview.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/quick/items/qquickpathview.cpp b/src/quick/items/qquickpathview.cpp index 1561dbc00c..08d20ac00c 100644 --- a/src/quick/items/qquickpathview.cpp +++ b/src/quick/items/qquickpathview.cpp @@ -1573,10 +1573,12 @@ void QQuickPathView::componentComplete() void QQuickPathView::refill() { Q_D(QQuickPathView); + + d->layoutScheduled = false; + if (!d->isValid() || !isComponentComplete()) return; - d->layoutScheduled = false; bool currentVisible = false; // first move existing items and remove items off path |