diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-06-24 22:44:41 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-06-24 22:44:41 (GMT) |
commit | 098e1939cfdf675ae850912d898f1af0b2c660cc (patch) | |
tree | 068677be10c039040012965716777549f7f32cb7 | |
parent | 60e9ce020e4d3f78a6d96b9cf7c78275a326aef2 (diff) | |
download | Qt-098e1939cfdf675ae850912d898f1af0b2c660cc.zip Qt-098e1939cfdf675ae850912d898f1af0b2c660cc.tar.gz Qt-098e1939cfdf675ae850912d898f1af0b2c660cc.tar.bz2 |
Fix GridView handling of unrequested items.
If unrequested items were added before we had populated any items
they would not be laid out at all.
-rw-r--r-- | src/declarative/extra/qmltimer.cpp | 2 | ||||
-rw-r--r-- | src/declarative/fx/qfxgridview.cpp | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/declarative/extra/qmltimer.cpp b/src/declarative/extra/qmltimer.cpp index 0c13c4a..b891745 100644 --- a/src/declarative/extra/qmltimer.cpp +++ b/src/declarative/extra/qmltimer.cpp @@ -98,7 +98,7 @@ QmlTimer::QmlTimer(QObject *parent) /*! \qmlproperty int Timer::interval - Sets the \a interval between triggering. + Sets the \a interval in milliseconds between triggering. */ void QmlTimer::setInterval(int interval) { diff --git a/src/declarative/fx/qfxgridview.cpp b/src/declarative/fx/qfxgridview.cpp index 0ca9393..a6ffbb9 100644 --- a/src/declarative/fx/qfxgridview.cpp +++ b/src/declarative/fx/qfxgridview.cpp @@ -234,6 +234,8 @@ public: int count = columns - 1 - (modelIndex - visibleItems.last()->index - 1) % columns; return visibleItems.last()->colPos() - count * colSize(); } + } else { + return (modelIndex % columns) * colSize(); } return 0; } @@ -252,6 +254,8 @@ public: int rows = col / (columns * colSize()); return visibleItems.last()->rowPos() + rows * rowSize(); } + } else { + return (modelIndex / columns) * rowSize(); } return 0; } |