Fix layout bug from view refactoring
authorBea Lam <bea.lam@nokia.com>
Mon, 18 Jul 2011 03:29:18 +0000 (13:29 +1000)
committerQt by Nokia <qt-info@nokia.com>
Fri, 22 Jul 2011 00:21:16 +0000 (02:21 +0200)
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 <qt_sanity_bot@ovi.com>
Reviewed-by: Bea Lam <bea.lam@nokia.com>
src/declarative/items/qsggridview.cpp

index ef660c0..8d91a41 100644 (file)
@@ -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();
 }