diff --git a/src/gui/tracks/TrackView.cpp b/src/gui/tracks/TrackView.cpp index 08ad01c9c..e23236021 100644 --- a/src/gui/tracks/TrackView.cpp +++ b/src/gui/tracks/TrackView.cpp @@ -393,17 +393,18 @@ void TrackView::mouseReleaseEvent( QMouseEvent * me ) void TrackView::wheelEvent(QWheelEvent* we) { - we->accept(); - - const int deltaY = we->angleDelta().y(); + // Note: we add the values because one of them will be 0. If the alt modifier + // is pressed x is non-zero and otherwise y. + const int deltaY = we->angleDelta().x() + we->angleDelta().y(); int const direction = deltaY < 0 ? -1 : 1; auto const modKeys = we->modifiers(); - int stepSize = modKeys == Qt::ControlModifier ? 1 : modKeys == Qt::ShiftModifier ? 5 : 0; + int stepSize = modKeys == (Qt::ControlModifier | Qt::AltModifier) ? 1 : modKeys == (Qt::ShiftModifier | Qt::AltModifier) ? 5 : 0; if (stepSize != 0) { resizeToHeight(height() + stepSize * direction); + we->accept(); } }