Skip to content

Commit

Permalink
Gui: [skip ci] Revert workaround to avoid to handle wheel events twic…
Browse files Browse the repository at this point in the history
…e 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
  • Loading branch information
wwmayer committed Nov 3, 2020
1 parent f4aceec commit c9923ab
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions src/Gui/Quarter/QuarterWidget.cpp
Expand Up @@ -1003,20 +1003,7 @@ bool QuarterWidget::viewportEvent(QEvent* event)
QMouseEvent* mouse = static_cast<QMouseEvent*>(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;
}
}
Expand Down

0 comments on commit c9923ab

Please sign in to comment.