diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-06-11 00:14:13 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-06-11 00:14:13 (GMT) |
commit | 90786cb0d8dd8da2cc53258c93c0129f7c4095fc (patch) | |
tree | cad23d61e75d2a051753544e4256d325bb103120 /src/declarative/graphicsitems/qdeclarativegridview.cpp | |
parent | f50b196c3bf2b18e3b1e66f8459be94b42326dc6 (diff) | |
download | Qt-90786cb0d8dd8da2cc53258c93c0129f7c4095fc.zip Qt-90786cb0d8dd8da2cc53258c93c0129f7c4095fc.tar.gz Qt-90786cb0d8dd8da2cc53258c93c0129f7c4095fc.tar.bz2 |
Avoid recursive refill() in List/GridView
Task-number: QTBUG-11362
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativegridview.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativegridview.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index ed1d271..da01eb5 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -897,12 +897,10 @@ void QDeclarativeGridViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m timeline.reset(data.move); if (viewPos != position()) { - if (fixupDuration) { + if (fixupDuration) timeline.move(data.move, -viewPos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2); - } else { - data.move.setValue(-viewPos); - q->viewportMoved(); - } + else + timeline.set(data.move, -viewPos); } vTime = timeline.time(); } @@ -911,12 +909,10 @@ void QDeclarativeGridViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m qreal dist = qAbs(data.move.value() - pos); if (dist > 0) { timeline.reset(data.move); - if (fixupDuration) { + if (fixupDuration) timeline.move(data.move, pos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2); - } else { - data.move.setValue(pos); - q->viewportMoved(); - } + else + timeline.set(data.move, pos); vTime = timeline.time(); } } else { |