summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@nokia.com>2011-01-13 14:16:03 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2011-01-17 10:24:14 (GMT)
commit77a034bcba5b2c98ee5cf1b575086950a66203b3 (patch)
tree6539a1579f045f089f779ff32bdd32f11c5e20e9 /src
parenta9bb2f46aedcbcd8122dcf30aa62498b21fc53be (diff)
downloadQt-77a034bcba5b2c98ee5cf1b575086950a66203b3.zip
Qt-77a034bcba5b2c98ee5cf1b575086950a66203b3.tar.gz
Qt-77a034bcba5b2c98ee5cf1b575086950a66203b3.tar.bz2
Proper fix for QGraphicsItem crash.
See 8ffb49a4ac68b1c243b25343053e6e99f97ec2e7 Task-number: QTBUG-16374 Reviewed-by: TrustMe (cherry picked from commit 46ede046a34c822c612c55fdb1dc93dffe3fc6b6)
Diffstat (limited to 'src')
-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));
}