diff options
author | Joona Petrell <joona.t.petrell@nokia.com> | 2010-05-12 06:28:57 (GMT) |
---|---|---|
committer | Joona Petrell <joona.t.petrell@nokia.com> | 2010-05-13 00:21:51 (GMT) |
commit | f17c706db16aae93f024e88208e139063f5b2c7c (patch) | |
tree | bbe5ed2f89e71af726b07bdcec6fb4248a57768e /src/gui/graphicsview | |
parent | 386b658ce39bfab16ea14b232c61ad4703f11619 (diff) | |
download | Qt-f17c706db16aae93f024e88208e139063f5b2c7c.zip Qt-f17c706db16aae93f024e88208e139063f5b2c7c.tar.gz Qt-f17c706db16aae93f024e88208e139063f5b2c7c.tar.bz2 |
Fix for graphics widget in the background stealing declarative item's focus
Task-number: QTBUG-10584
Reviewed-by: Warwick Allison
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index dacdbfe..7abd5f6 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -1320,10 +1320,10 @@ void QGraphicsScenePrivate::mousePressEventHandler(QGraphicsSceneMouseEvent *mou setFocus = true; break; } - if (item->isEnabled() && ((item->flags() & QGraphicsItem::ItemIsFocusable) && item->d_ptr->mouseSetsFocus)) { + if (item->isEnabled() && ((item->flags() & QGraphicsItem::ItemIsFocusable))) { if (!item->isWidget() || ((QGraphicsWidget *)item)->focusPolicy() & Qt::ClickFocus) { setFocus = true; - if (item != q->focusItem()) + if (item != q->focusItem() && item->d_ptr->mouseSetsFocus) q->setFocusItem(item, Qt::MouseFocusReason); break; } |