diff options
author | Martin Jones <martin.jones@nokia.com> | 2011-04-12 04:51:19 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2011-04-12 05:08:31 (GMT) |
commit | ddae2b67a8eab5e6b298ce516234f4bf7c0367c1 (patch) | |
tree | 1f66c06dbf17c228b20fca6ffc13f66334ef0bad /src/declarative/graphicsitems/qdeclarativelistview.cpp | |
parent | 3bc0d853a09ae55c158946a99284a47b0b30a3b4 (diff) | |
download | Qt-ddae2b67a8eab5e6b298ce516234f4bf7c0367c1.zip Qt-ddae2b67a8eab5e6b298ce516234f4bf7c0367c1.tar.gz Qt-ddae2b67a8eab5e6b298ce516234f4bf7c0367c1.tar.bz2 |
Ensure view is positioned correctly when orientation changes.
Change-Id: I7fbedff965ae8c89dcbb96ba5dcee85c07aa29b1
Task-number: QTBUG-17065
Reviewed-by: Bea Lam
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativelistview.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativelistview.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index f176916..4da45d1 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -2119,9 +2119,11 @@ void QDeclarativeListView::setOrientation(QDeclarativeListView::Orientation orie if (d->orient == QDeclarativeListView::Vertical) { setContentWidth(-1); setFlickableDirection(VerticalFlick); + setContentX(0); } else { setContentHeight(-1); setFlickableDirection(HorizontalFlick); + setContentY(0); } d->regenerate(); emit orientationChanged(); |