summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2012-05-30 18:25:44 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2012-05-30 19:01:04 -0300
commite4808c9a4888971fecc1ff43ef19587273699afd (patch)
treeb16096a6b2a801493c98b986d7a967e4fbb13d17
parentdf999cea8985d2594cabe87ed623e3f7150c21ef (diff)
Fixed tabs pager to automatically scroll out of an empty page.
When the tabs pager has more than one page and the user closes all the tabs there, the pager should automatically scroll to the last page. Reviewed-by: Rafael Brandão
-rw-r--r--src/mobile/qml/PagedGrid.qml5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mobile/qml/PagedGrid.qml b/src/mobile/qml/PagedGrid.qml
index 9543ad0..680a692 100644
--- a/src/mobile/qml/PagedGrid.qml
+++ b/src/mobile/qml/PagedGrid.qml
@@ -52,6 +52,11 @@ Item {
return grid.itemAt(index)
}
+ onPageCountChanged: {
+ if (pageCount === currentPage && currentPage > 0)
+ --currentPage;
+ }
+
PageFillGrid {
id: grid
model: pagedGrid.model