diff options
author | David Boddie <dboddie@trolltech.com> | 2010-08-24 14:08:28 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2010-08-24 14:08:28 (GMT) |
commit | c408dd8a80d509f18ec3c3bc8a74891f541f6fdd (patch) | |
tree | a29369b3d1e03f8f688b128e231c004081028bb6 /src/declarative/graphicsitems/qdeclarativepathview.cpp | |
parent | ef9cc109f1a6fe84ca27a6c8a53f1783b8bdf14d (diff) | |
parent | a8030e0c543e538652605557843b845f89b11589 (diff) | |
download | Qt-c408dd8a80d509f18ec3c3bc8a74891f541f6fdd.zip Qt-c408dd8a80d509f18ec3c3bc8a74891f541f6fdd.tar.gz Qt-c408dd8a80d509f18ec3c3bc8a74891f541f6fdd.tar.bz2 |
Merge branch '4.7' into qmldocs
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativepathview.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativepathview.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp index 535fb90..4b97505 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview.cpp +++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp @@ -480,7 +480,8 @@ void QDeclarativePathView::setModel(const QVariant &model) connect(d->model, SIGNAL(modelReset()), this, SLOT(modelReset())); connect(d->model, SIGNAL(createdItem(int, QDeclarativeItem*)), this, SLOT(createdItem(int,QDeclarativeItem*))); } - d->offset = qmlMod(d->offset, qreal(d->model->count())); + if (d->model->count()) + d->offset = qmlMod(d->offset, qreal(d->model->count())); if (d->offset < 0) d->offset = d->model->count() + d->offset; d->regenerate(); |