summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-04-30 06:13:30 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-04-30 06:13:30 (GMT)
commit4a2c238a6dfbbdf3bd27a91efc96b747944e767a (patch)
treec4a4e6ff81cec58f30b1799f13c685984e8abe36
parent7b9d8b6b98378cb69b4276f4bc49331556a394c0 (diff)
downloadQt-4a2c238a6dfbbdf3bd27a91efc96b747944e767a.zip
Qt-4a2c238a6dfbbdf3bd27a91efc96b747944e767a.tar.gz
Qt-4a2c238a6dfbbdf3bd27a91efc96b747944e767a.tar.bz2
Avoid regenerating PathView delegates needlessly
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp
index 911f5a4..b35d30d 100644
--- a/src/declarative/graphicsitems/qdeclarativepathview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp
@@ -795,7 +795,7 @@ void QDeclarativePathView::setInteractive(bool interactive)
The number of elements in the delegate has a direct effect on the
flicking performance of the view when pathItemCount is specified. If at all possible, place functionality
that is not needed for the normal display of the delegate in a \l Loader which
- can be created when needed.
+ can load additional elements when needed.
Note that the PathView will layout the items based on the size of the root
item in the delegate.
@@ -1051,7 +1051,11 @@ void QDeclarativePathView::componentComplete()
Q_D(QDeclarativePathView);
QDeclarativeItem::componentComplete();
d->createHighlight();
- d->regenerate();
+ // It is possible that a refill has already happended to to Path
+ // bindings being handled in the componentComplete(). If so
+ // don't do it again.
+ if (d->items.count() == 0)
+ d->regenerate();
d->updateHighlight();
}