diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-08-19 08:39:40 (GMT) |
---|---|---|
committer | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-08-19 08:39:40 (GMT) |
commit | 928f902015a0ad97279ce6e2ac4cb85e5baed684 (patch) | |
tree | c3afd6f5b72b32136ab9d40788e1cf05d7b91763 /src/gui/graphicsview/qgraphicsscene.cpp | |
parent | 17d6f2a59fe2b170087cdf7074807c6a2dce1043 (diff) | |
parent | 5fb5c01bd0ac234eaca890d97053c7b0772861a3 (diff) | |
download | Qt-928f902015a0ad97279ce6e2ac4cb85e5baed684.zip Qt-928f902015a0ad97279ce6e2ac4cb85e5baed684.tar.gz Qt-928f902015a0ad97279ce6e2ac4cb85e5baed684.tar.bz2 |
Merge commit 'qt/master' into kinetic-graphicseffect
Conflicts:
src/gui/graphicsview/qgraphicsitem_p.h
Diffstat (limited to 'src/gui/graphicsview/qgraphicsscene.cpp')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index e4a02e2..db783ad 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -44,9 +44,8 @@ \brief The QGraphicsScene class provides a surface for managing a large number of 2D graphical items. \since 4.2 - \ingroup multimedia \ingroup graphicsview-api - \mainclass + The class serves as a container for QGraphicsItems. It is used together with QGraphicsView for visualizing graphical items, such as lines, @@ -1080,7 +1079,7 @@ void QGraphicsScenePrivate::mousePressEventHandler(QGraphicsSceneMouseEvent *mou // Set focus on the topmost enabled item that can take focus. bool setFocus = false; foreach (QGraphicsItem *item, cachedItemsUnderMouse) { - if (item->isEnabled() && (item->flags() & QGraphicsItem::ItemIsFocusable)) { + if (item->isEnabled() && ((item->flags() & QGraphicsItem::ItemIsFocusable) && item->d_ptr->mouseSetsFocus)) { if (!item->isWidget() || ((QGraphicsWidget *)item)->focusPolicy() & Qt::ClickFocus) { setFocus = true; if (item != q->focusItem()) @@ -3803,7 +3802,8 @@ void QGraphicsScene::wheelEvent(QGraphicsSceneWheelEvent *wheelEvent) bool hasSetFocus = false; foreach (QGraphicsItem *item, wheelCandidates) { - if (!hasSetFocus && item->isEnabled() && (item->flags() & QGraphicsItem::ItemIsFocusable)) { + if (!hasSetFocus && item->isEnabled() + && ((item->flags() & QGraphicsItem::ItemIsFocusable) && item->d_ptr->mouseSetsFocus)) { if (item->isWidget() && static_cast<QGraphicsWidget *>(item)->focusPolicy() == Qt::WheelFocus) { hasSetFocus = true; if (item != focusItem()) @@ -5345,7 +5345,7 @@ bool QGraphicsScenePrivate::sendTouchBeginEvent(QGraphicsItem *origin, QTouchEve // Set focus on the topmost enabled item that can take focus. bool setFocus = false; foreach (QGraphicsItem *item, cachedItemsUnderMouse) { - if (item->isEnabled() && (item->flags() & QGraphicsItem::ItemIsFocusable)) { + if (item->isEnabled() && ((item->flags() & QGraphicsItem::ItemIsFocusable) && item->d_ptr->mouseSetsFocus)) { if (!item->isWidget() || ((QGraphicsWidget *)item)->focusPolicy() & Qt::ClickFocus) { setFocus = true; if (item != q->focusItem()) |