diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-07-29 23:51:29 (GMT) |
---|---|---|
committer | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-07-29 23:51:29 (GMT) |
commit | 4b7ba7d5209a041b85abf1e335ad7aceb2158454 (patch) | |
tree | 7b28a804224ba76ca8144fe38e13f8672f50ee28 /src/gui | |
parent | 420356570670dfccd3c03a778e8490717f4675ab (diff) | |
download | Qt-4b7ba7d5209a041b85abf1e335ad7aceb2158454.zip Qt-4b7ba7d5209a041b85abf1e335ad7aceb2158454.tar.gz Qt-4b7ba7d5209a041b85abf1e335ad7aceb2158454.tar.bz2 |
Small optimization to QGraphicsEffectSource::boundingRect.
Don't bother asking for the childrenBoundingRect if the item has no
children.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 5178d80..b26e038 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -9995,7 +9995,8 @@ int QGraphicsItemGroup::type() const QRectF QGraphicsItemEffectSourcePrivate::boundingRect(Qt::CoordinateSystem system) const { QRectF rect = item->boundingRect(); - rect |= item->childrenBoundingRect(); + if (!item->d_ptr->children.isEmpty()) + rect |= item->childrenBoundingRect(); if (info && system == Qt::DeviceCoordinates) { Q_ASSERT(info->transformPtr); return info->transformPtr->mapRect(rect); |