diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativepathview.cpp | 8 | ||||
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp | 7 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp index 2f963cd..7cb723c 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. @@ -1056,7 +1056,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(); } diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp index 43cafe3..2addc77 100644 --- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp @@ -55,6 +55,7 @@ #include <qdeclarativeguard_p.h> #include <qdeclarativeglobal_p.h> +#include <qgraphicsscene.h> #include <qlistmodelinterface_p.h> #include <qhash.h> #include <qlist.h> @@ -966,10 +967,8 @@ QDeclarativeVisualDataModel::ReleaseFlags QDeclarativeVisualDataModel::release(Q if (inPackage) { emit destroyingPackage(qobject_cast<QDeclarativePackage*>(obj)); } else { - if (item->hasFocus()) - item->clearFocus(); - item->setOpacity(0.0); - static_cast<QGraphicsItem*>(item)->setParentItem(0); + if (item->scene()) + item->scene()->removeItem(item); } stat |= Destroyed; obj->deleteLater(); |