From ba48a3fdf39a3db7a3d13ac15031c810454c6e25 Mon Sep 17 00:00:00 2001 From: Andreas Aardal Hanssen Date: Thu, 4 Jun 2009 15:59:25 +0200 Subject: Fix bug in QGraphicsItem::effectiveOpacity() caused by typo. See change 72842b2d, the patch misplaces 'p' and 'parent'. This fixes the tst_QGraphicsItem::opacity autotests. Reviewed-by: bnilsen --- src/gui/graphicsview/qgraphicsitem_p.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index 2752056..9be9310 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -296,10 +296,11 @@ public: // parent propagates to me, then combine my local opacity with my parent's // effective opacity into my effective opacity. if ((myFlags & QGraphicsItem::ItemIgnoresParentOpacity) - || (parentFlags & QGraphicsItem::ItemDoesntPropagateOpacityToChildren)) + || (parentFlags & QGraphicsItem::ItemDoesntPropagateOpacityToChildren)) { break; + } - o *= parent->d_ptr->opacity; + o *= p->d_ptr->opacity; p = p->d_ptr->parent; myFlags = parentFlags; } -- cgit v0.12