From b3ff60a43d0612ee12da18afff34941c6b307cdc Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Mon, 18 Jul 2011 13:29:18 +1000 Subject: [PATCH] Fix layout bug from view refactoring GridView should call layout() not layoutVisibleItems() in setCellWidth(), setCellHeight() and itemsMoved() Bug introduced when refactoring view code into QSGItemView. Change-Id: I48bc63c0a08c10c005bf45a2a7902cb01632cbf9 Reviewed-on: http://codereview.qt.nokia.com/1726 Reviewed-by: Qt Sanity Bot Reviewed-by: Bea Lam --- src/declarative/items/qsggridview.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/declarative/items/qsggridview.cpp b/src/declarative/items/qsggridview.cpp index ef660c0..8d91a41 100644 --- a/src/declarative/items/qsggridview.cpp +++ b/src/declarative/items/qsggridview.cpp @@ -1021,7 +1021,7 @@ void QSGGridView::setCellWidth(int cellWidth) d->cellWidth = qMax(1, cellWidth); d->updateViewport(); emit cellWidthChanged(); - d->layoutVisibleItems(); + d->layout(); } } @@ -1038,7 +1038,7 @@ void QSGGridView::setCellHeight(int cellHeight) d->cellHeight = qMax(1, cellHeight); d->updateViewport(); emit cellHeightChanged(); - d->layoutVisibleItems(); + d->layout(); } } @@ -1566,7 +1566,7 @@ void QSGGridView::itemsMoved(int from, int to, int count) d->releaseItem(item); } - d->layoutVisibleItems(); + d->layout(); } -- 2.7.4