Skip to content

Commit

Permalink
Gui: [skip ci] avoid that 3D view handles a single wheel scroll event…
Browse files Browse the repository at this point in the history
… twice
  • Loading branch information
wwmayer committed Apr 2, 2020
1 parent 7d18017 commit 5324540
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Gui/Quarter/QuarterWidget.cpp
Expand Up @@ -999,7 +999,13 @@ bool QuarterWidget::viewportEvent(QEvent* event)
QMouseEvent* mouse = static_cast<QMouseEvent*>(event);
QGraphicsItem *item = itemAt(mouse->pos());
if (!item) {
QGraphicsView::viewportEvent(event);
bool ok = QGraphicsView::viewportEvent(event);
// Avoid that wheel events are handled twice
// https://forum.freecadweb.org/viewtopic.php?f=3&t=44822
if (event->type() == QEvent::Wheel) {
event->setAccepted(ok);
return ok;
}
return false;
}
}
Expand Down

0 comments on commit 5324540

Please sign in to comment.