aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCaio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>2011-08-23 19:04:16 -0300
committerQt by Nokia <qt-info@nokia.com>2011-08-24 04:23:40 +0200
commit0d572fc7d251691a34fe5b99c60868835409047e (patch)
tree4b68d2246e990730af1d711304a656eed06eb866 /src
parent6b18f28e38149a4f35e48dc2a7f52bc7a23587c3 (diff)
Do not deliver mouse wheel events when item is not visible
This patch change the code to also skip invisible items (it was done for disabled already) when deciding whether or not deliver the wheel event to an item. The rationale here is to follow the same rule as the other mouse events. An autotest was added to verify and maintain this behavior. Change-Id: If0fe6d64d1f7cfb8679ce11edda7c02dc3783f94 Reviewed-on: http://codereview.qt.nokia.com/3429 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/declarative/items/qsgcanvas.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/items/qsgcanvas.cpp b/src/declarative/items/qsgcanvas.cpp
index 11b3b030ed..6873c41cef 100644
--- a/src/declarative/items/qsgcanvas.cpp
+++ b/src/declarative/items/qsgcanvas.cpp
@@ -1306,7 +1306,7 @@ bool QSGCanvasPrivate::deliverWheelEvent(QSGItem *item, QWheelEvent *event)
QList<QSGItem *> children = itemPrivate->paintOrderChildItems();
for (int ii = children.count() - 1; ii >= 0; --ii) {
QSGItem *child = children.at(ii);
- if (!child->isEnabled())
+ if (!child->isVisible() || !child->isEnabled())
continue;
if (deliverWheelEvent(child, event))
return true;