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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user