From 545608ee97c85b3d7c0707e66ed14cf05c390490 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Fri, 3 Aug 2012 17:18:57 +1000 Subject: Document that add transitions should not animate item height Change-Id: I4941e96e9ea96dfe364b9b95a00372d94695c7a3 Reviewed-by: Bea Lam --- src/quick/items/qquickgridview.cpp | 6 ++++-- src/quick/items/qquicklistview.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/quick/items/qquickgridview.cpp b/src/quick/items/qquickgridview.cpp index 139f9e79f1..e72207cc37 100644 --- a/src/quick/items/qquickgridview.cpp +++ b/src/quick/items/qquickgridview.cpp @@ -1765,8 +1765,10 @@ void QQuickGridView::setSnapMode(SnapMode mode) documentation. \note This transition is not applied to the items that are created when the view is initially - populated, or when the view's \l model changes. In those cases, the \l populate transition is - applied instead. + populated, or when the view's \l model changes. (In those cases, the \l populate transition is + applied instead.) Additionally, this transition should \e not animate the height of the new item; + doing so will cause any items beneath the new item to be laid out at the wrong position. Instead, + the height can be animated within a \l {ListView::onAdd()}{ListView.onAdd} in the delegate. \sa addDisplaced, populate, ViewTransition */ diff --git a/src/quick/items/qquicklistview.cpp b/src/quick/items/qquicklistview.cpp index f9ff4db153..b92737c7f7 100644 --- a/src/quick/items/qquicklistview.cpp +++ b/src/quick/items/qquicklistview.cpp @@ -2433,8 +2433,10 @@ void QQuickListView::setSnapMode(SnapMode mode) documentation. \note This transition is not applied to the items that are created when the view is initially - populated, or when the view's \l model changes. In those cases, the \l populate transition is - applied instead. + populated, or when the view's \l model changes. (In those cases, the \l populate transition is + applied instead.) Additionally, this transition should \e not animate the height of the new item; + doing so will cause any items beneath the new item to be laid out at the wrong position. Instead, + the height can be animated within a \l {ListView::onAdd()}{ListView.onAdd} in the delegate. \sa addDisplaced, populate, ViewTransition */ -- cgit v1.2.3