summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSérgio Martins <sergio.martins@kdab.com>2013-10-11 18:14:43 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-15 12:42:36 +0100
commitf59e29d9bfab2863b29769e318ae96f4640bd768 (patch)
tree87d1022e78bcf4156ab6889c06d49fcaa4a7dca3
parente2557933cb62ba26c16262a26bc0654e655f3a9f (diff)
Don't accept wheel events if sendEvent() returns false.
Otherwise wheeling over disabled items won't let the wheel event propagate to the parent. An easy way to reproduce the problem is by having a flickable with some disabled item in it. Task-number: QTBUG-33477 Change-Id: Ib327cc34dd9f415617ffbc41064f689507446c05 Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
-rw-r--r--src/widgets/graphicsview/qgraphicsscene.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/widgets/graphicsview/qgraphicsscene.cpp b/src/widgets/graphicsview/qgraphicsscene.cpp
index ad7a82518e..41d4fc925a 100644
--- a/src/widgets/graphicsview/qgraphicsscene.cpp
+++ b/src/widgets/graphicsview/qgraphicsscene.cpp
@@ -4147,8 +4147,9 @@ void QGraphicsScene::wheelEvent(QGraphicsSceneWheelEvent *wheelEvent)
wheelEvent->widget()));
wheelEvent->accept();
bool isPanel = item->isPanel();
- d->sendEvent(item, wheelEvent);
- if (isPanel || wheelEvent->isAccepted())
+ bool ret = d->sendEvent(item, wheelEvent);
+
+ if (ret && (isPanel || wheelEvent->isAccepted()))
break;
}
}