summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 466cc47..9e1fd09 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -1157,7 +1157,6 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q
if (q_ptr == fsi || q_ptr->isAncestorOf(fsi)) {
parentFocusScopeItem = fsi;
p->d_ptr->focusScopeItem = 0;
- fsi->d_ptr->focusScopeItemChange(false);
}
break;
}
@@ -1259,6 +1258,10 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q
if (!inDestructor && (transformData || (newParent && newParent->d_ptr->transformData)))
transformChanged();
+ // Reparenting is finished, now safe to notify the previous focusScopeItem about changes
+ if (parentFocusScopeItem)
+ parentFocusScopeItem->d_ptr->focusScopeItemChange(false);
+
// Restore the sub focus chain.
if (subFocusItem) {
subFocusItem->d_ptr->setSubFocus(newParent);