summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2012-01-24 05:23:26 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-02-02 03:07:23 (GMT)
commit626cf4b0dee6b2d403876ebb499f47505c63e7b6 (patch)
tree62bd1a144f8bb1e464eecea3c50e322918ba5317 /src/declarative
parentf8139a07533e912b24173ed24a041d861043dcfb (diff)
downloadQt-626cf4b0dee6b2d403876ebb499f47505c63e7b6.zip
Qt-626cf4b0dee6b2d403876ebb499f47505c63e7b6.tar.gz
Qt-626cf4b0dee6b2d403876ebb499f47505c63e7b6.tar.bz2
Fixed crash in QDeclarativeGridView
Inserting new items used a different threshold than removing items outside the view in refill. Change-Id: Id3605122a7a31caf0b661e78b5d868ceb3f01e20 Reviewed-by: Bea Lam <bea.lam@nokia.com>
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index 1d9348c..8e8e957 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -2849,7 +2849,7 @@ void QDeclarativeGridView::itemsInserted(int modelIndex, int count)
bool addedVisible = false;
QList<FxGridItem*> added;
int i = 0;
- while (i < insertCount && rowPos <= to + d->rowSize()*(d->columns - (colPos/d->colSize()))/qreal(d->columns)) {
+ while (i < insertCount && rowPos <= to + d->rowSize()*(d->columns - (colPos/d->colSize()))/qreal(d->columns+1)) {
if (!addedVisible) {
d->scheduleLayout();
addedVisible = true;