Skip to content

Commit

Permalink
Merge pull request #4195 from raphabigal/invert-scroll-zoom-waveform
Browse files Browse the repository at this point in the history
Fix inverted scroll wheel waveform zoom direction
  • Loading branch information
ronso0 authored Aug 12, 2021
2 parents 48fb24d + d69f3d6 commit e2d4f1f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/widget/wwaveformviewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,12 @@ void WWaveformViewer::mouseReleaseEvent(QMouseEvent* /*event*/) {
setCursor(Qt::ArrowCursor);
}

void WWaveformViewer::wheelEvent(QWheelEvent *event) {
void WWaveformViewer::wheelEvent(QWheelEvent* event) {
if (m_waveformWidget) {
if (event->angleDelta().y() > 0) {
onZoomChange(m_waveformWidget->getZoomFactor() * 1.05);
} else {
onZoomChange(m_waveformWidget->getZoomFactor() / 1.05);
} else {
onZoomChange(m_waveformWidget->getZoomFactor() * 1.05);
}
}
}
Expand Down

0 comments on commit e2d4f1f

Please sign in to comment.