Allow current item creation to interrupt async delegate creation.
Fixes unstable test tst_QQuickGridView::insertBeforeVisible(). Change-Id: Iebf02d3c4c202b300409be567906c64c02917dda Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
This commit is contained in:
parent
e6bafe1096
commit
8a338a3bba
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue