From 8a338a3bba898b6bacd0f18f783aaaab64877070 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 1 Dec 2011 14:30:44 +1000 Subject: [PATCH] Allow current item creation to interrupt async delegate creation. Fixes unstable test tst_QQuickGridView::insertBeforeVisible(). Change-Id: Iebf02d3c4c202b300409be567906c64c02917dda Reviewed-by: Andrew den Exter --- src/declarative/items/qquickitemview.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/declarative/items/qquickitemview.cpp b/src/declarative/items/qquickitemview.cpp index c329cd5..edbe2a5 100644 --- a/src/declarative/items/qquickitemview.cpp +++ b/src/declarative/items/qquickitemview.cpp @@ -307,7 +307,7 @@ int QQuickItemView::currentIndex() const void QQuickItemView::setCurrentIndex(int index) { Q_D(QQuickItemView); - if (d->requestedIndex >= 0) // currently creating item + if (d->requestedIndex >= 0 && !d->requestedAsync) // currently creating item return; d->currentIndexCleared = (index == -1); -- 1.7.2.5