summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@nokia.com>2011-01-13 14:16:03 (GMT)
committerYoann Lopes <yoann.lopes@nokia.com>2011-01-13 14:22:11 (GMT)
commit46ede046a34c822c612c55fdb1dc93dffe3fc6b6 (patch)
tree8c0368747170f3d0cd31d4d5bf81a73fd2671063
parent0808eb1222c70341b0deee3164089c8b6a03ef06 (diff)
downloadQt-46ede046a34c822c612c55fdb1dc93dffe3fc6b6.zip
Qt-46ede046a34c822c612c55fdb1dc93dffe3fc6b6.tar.gz
Qt-46ede046a34c822c612c55fdb1dc93dffe3fc6b6.tar.bz2
Proper fix for QGraphicsItem crash.
See 8ffb49a4ac68b1c243b25343053e6e99f97ec2e7 Task-number: QTBUG-16374 Reviewed-by: TrustMe
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index a892094..52e4d79 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -5592,9 +5592,8 @@ void QGraphicsItemPrivate::clearSubFocus(QGraphicsItem *rootItem, QGraphicsItem
if (parent->d_ptr->subFocusItem != q_ptr)
break;
parent->d_ptr->subFocusItem = 0;
- if (parent == stopItem)
- break;
- parent->d_ptr->subFocusItemChange();
+ if (parent != stopItem && !parent->isAncestorOf(stopItem))
+ parent->d_ptr->subFocusItemChange();
} while (!parent->isPanel() && (parent = parent->d_ptr->parent));
}