diff options
author | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-09-15 13:12:52 (GMT) |
---|---|---|
committer | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-09-15 13:20:57 (GMT) |
commit | 4c779ca7cd74b77ec5f7e480b9762acccce3c4ad (patch) | |
tree | ce10bb255720e58d8cfd762ddc3e5baea99e9a26 /src/gui/graphicsview | |
parent | fd8be39b40467be69a7cd9c5a009c5a47c6a4e9b (diff) | |
download | Qt-4c779ca7cd74b77ec5f7e480b9762acccce3c4ad.zip Qt-4c779ca7cd74b77ec5f7e480b9762acccce3c4ad.tar.gz Qt-4c779ca7cd74b77ec5f7e480b9762acccce3c4ad.tar.bz2 |
Fix a bug in FocusScopes; ensure subFocus is set correctly.
The bug was triggered by setting focus on a parent scope (which then
passes focus to the innermost scope). Subfocus was set up for the
first scope, but not the inner scopes.
Reviewed-by: TrustMe
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 838bd34..81eeb39 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -2830,6 +2830,8 @@ void QGraphicsItemPrivate::setFocusHelper(Qt::FocusReason focusReason, bool clim if (climb) { while (f->d_ptr->focusScopeItem && f->d_ptr->focusScopeItem->isVisible()) f = f->d_ptr->focusScopeItem; + if (f != q_ptr) + f->d_ptr->setSubFocus(); } // Update the scene's focus item. @@ -4979,7 +4981,7 @@ void QGraphicsItemPrivate::clearSubFocus(QGraphicsItem *rootItem) if (parent->d_ptr->subFocusItem != q_ptr) break; parent->d_ptr->subFocusItem = 0; - subFocusItemChange(); + parent->d_ptr->subFocusItemChange(); } while (!parent->isPanel() && (parent = parent->d_ptr->parent)); } |