QGraphicsItem::setOpacity(0.0) does not trigger an update.
authorBjoern Erik Nilsen <bjorn.nilsen@nokia.com>
Wed, 6 May 2009 11:40:25 +0000 (13:40 +0200)
committerBjoern Erik Nilsen <bjorn.nilsen@nokia.com>
Wed, 6 May 2009 13:23:29 +0000 (15:23 +0200)
commit2e3a5ea4434d19fbdb90996e71961f0791ea6487
tree7f04e1829a00e3462b400f43bda73801f14da190
parent2043637a4e17252062fcb483e2e63ce0cb0920dd
QGraphicsItem::setOpacity(0.0) does not trigger an update.

The problem was that we discarded update requests for fully
transparent items, which is correct, but we even did that
when the update was issued from QGraphicsItem::setOpacity.
We don't have to, and shouldn't, consider the opacity in
that case. Whenever we reach the fullUpdateHelper call in
setOpacity it means we have to do an update regardless of
the current opacity (oldOpacity was not 0.0 if the
currentOpacity is 0.0).

Auto-test included.

Task-number: 252913
Reviewed-by: Andreas
src/gui/graphicsview/qgraphicsitem.cpp
src/gui/graphicsview/qgraphicsitem_p.h
src/gui/graphicsview/qgraphicsview.cpp
tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp