aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@digia.com>2013-10-01 09:11:54 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-03 08:52:11 +0200
commit47635b6e872e3f537ba8859ff2ef7453a4ba374a (patch)
treee23e4b6461ab28221d7b1ddc8d645228ae88f46a /src/quick
parentd311e1bdfc756e2db9a9b9e4c1269da709e5090a (diff)
Mark DirtySubtreeBlocked correctly from OpacityNode
In the edgecase where the opacity was exactly the OPACITY_THRESHOLD we would fail to mark the tree as dirty. This led to a crash in the renderer. Change-Id: I618910d0c792a215133598b6a87217be1f8729bc Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/quick')
-rw-r--r--src/quick/scenegraph/coreapi/qsgnode.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgnode.cpp b/src/quick/scenegraph/coreapi/qsgnode.cpp
index d4241b7265..b0c869c096 100644
--- a/src/quick/scenegraph/coreapi/qsgnode.cpp
+++ b/src/quick/scenegraph/coreapi/qsgnode.cpp
@@ -1323,8 +1323,8 @@ void QSGOpacityNode::setOpacity(qreal opacity)
return;
DirtyState dirtyState = DirtyOpacity;
- if ((m_opacity < OPACITY_THRESHOLD && opacity > OPACITY_THRESHOLD)
- || (m_opacity > OPACITY_THRESHOLD && opacity < OPACITY_THRESHOLD))
+ if ((m_opacity < OPACITY_THRESHOLD && opacity >= OPACITY_THRESHOLD) // blocked to unblocked
+ || (m_opacity >= OPACITY_THRESHOLD && opacity < OPACITY_THRESHOLD)) // unblocked to blocked
dirtyState |= DirtySubtreeBlocked;
m_opacity = opacity;