diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-08-24 23:08:47 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-08-24 23:08:47 (GMT) |
commit | a33e3d8a7fefc3d2ad254dcb76a127b068b7c63d (patch) | |
tree | 2762cd9caa420db3182d54736a513640073902ca /src/declarative/fx | |
parent | fd6d3e18217d9b5c9c5c9435a1e7b47042a7f9ed (diff) | |
download | Qt-a33e3d8a7fefc3d2ad254dcb76a127b068b7c63d.zip Qt-a33e3d8a7fefc3d2ad254dcb76a127b068b7c63d.tar.gz Qt-a33e3d8a7fefc3d2ad254dcb76a127b068b7c63d.tar.bz2 |
Fix list startPosition calculation.
Diffstat (limited to 'src/declarative/fx')
-rw-r--r-- | src/declarative/fx/qfxlistview.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/declarative/fx/qfxlistview.cpp b/src/declarative/fx/qfxlistview.cpp index 8dfe171..59ece18 100644 --- a/src/declarative/fx/qfxlistview.cpp +++ b/src/declarative/fx/qfxlistview.cpp @@ -212,8 +212,11 @@ public: qreal startPosition() const { qreal pos = 0; - if (!visibleItems.isEmpty()) - pos = visibleItems.first()->position() - visibleIndex * (averageSize + spacing); + if (!visibleItems.isEmpty()) { + pos = visibleItems.first()->position(); + if (visibleIndex > 0) + pos -= visibleIndex * (averageSize + spacing) - spacing; + } return pos; } |