summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2011-03-29 22:57:32 (GMT)
committerMartin Jones <martin.jones@nokia.com>2011-03-29 23:57:41 (GMT)
commitf0c6b3eefdf342bbb71e9409ea050da3c92ac861 (patch)
tree88bda0233b5f70f4262082a15907b7a0fddf972e
parente5a911351ae11376e6d86d70ddacd4016450ed6b (diff)
downloadQt-f0c6b3eefdf342bbb71e9409ea050da3c92ac861.zip
Qt-f0c6b3eefdf342bbb71e9409ea050da3c92ac861.tar.gz
Qt-f0c6b3eefdf342bbb71e9409ea050da3c92ac861.tar.bz2
GridView jumps to beginning of list when resized
Introduced by RTL changes. The list position should only be reset when the view is completely regenerated, e.g. when the orientation changes. Change-Id: I748333529c113d95eaebfb8ac9bb9cf543413d3b Task-number: QTBUG-18441 Reviewed-by: Bea Lam
-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 c0cbed0..b409f87 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -197,6 +197,7 @@ public:
if (q->isComponentComplete()) {
clear();
updateGrid();
+ setPosition(0);
q->refill();
updateCurrent(currentIndex);
}
@@ -689,7 +690,6 @@ void QDeclarativeGridViewPrivate::updateGrid()
q->setContentHeight(endPosition() - startPosition());
else
q->setContentWidth(lastPosition() - originPosition());
- setPosition(0);
}
}