From c9923ab1536019369e3949b7fd028a8bfbe6db45 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 3 Nov 2020 14:50:06 +0100 Subject: [PATCH] Gui: [skip ci] Revert workaround to avoid to handle wheel events twice inside the 3d view This workaround caused a regression with Qt 5.15. For more details see: https://forum.freecadweb.org/viewtopic.php?f=3&t=50231 --- src/Gui/Quarter/QuarterWidget.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/Gui/Quarter/QuarterWidget.cpp b/src/Gui/Quarter/QuarterWidget.cpp index 75551987ea..32849e414c 100644 --- a/src/Gui/Quarter/QuarterWidget.cpp +++ b/src/Gui/Quarter/QuarterWidget.cpp @@ -1003,20 +1003,7 @@ bool QuarterWidget::viewportEvent(QEvent* event) QMouseEvent* mouse = static_cast(event); QGraphicsItem *item = itemAt(mouse->pos()); if (!item) { - bool ok = QGraphicsView::viewportEvent(event); - // Avoid that wheel events are handled twice - // https://forum.freecadweb.org/viewtopic.php?f=3&t=44822 - // However, this workaround seems to cause a regression on macOS - // so it's disabled for this platform. - // https://forum.freecadweb.org/viewtopic.php?f=4&t=44855 -#if defined(Q_OS_MAC) - Q_UNUSED(ok) -#else - if (event->type() == QEvent::Wheel) { - event->setAccepted(ok); - return ok; - } -#endif + QGraphicsView::viewportEvent(event); return false; } }