From f59e29d9bfab2863b29769e318ae96f4640bd768 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Martins?= Date: Fri, 11 Oct 2013 18:14:43 +0100 Subject: [PATCH] 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 Reviewed-by: Giuseppe D'Angelo --- src/widgets/graphicsview/qgraphicsscene.cpp | 5 +++-- 1 file 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; } }