diff --git a/debian/changelog b/debian/changelog index 5fcbd49aa..6e6f6771a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ qlcplus (4.13.2) stable; urgency=low * engine: add stopOnExit, waitFunctionStart and waitFunctionStop commands to Script - see documentation (thanks to ldebs) * UI/Fixture Manager: limit the number of RGB panel columns for RGBW to avoid crash * UI/Show Manager: show step notes on the timeline (thanks to anarchid) + * UI/Show Manager: handle CTRL+mouse wheel to zoom in/out * Plugins/OS2L: fix receiving multiple messages at once * Web Access: fix grand master stopping running functions * Web Access: fix simple desk not resetting the current universe diff --git a/ui/src/showmanager/multitrackview.cpp b/ui/src/showmanager/multitrackview.cpp index fe6a4358f..2b08eb9bb 100644 --- a/ui/src/showmanager/multitrackview.cpp +++ b/ui/src/showmanager/multitrackview.cpp @@ -494,6 +494,23 @@ void MultiTrackView::mouseReleaseEvent(QMouseEvent * e) //qDebug() << Q_FUNC_INFO << "View clicked at pos: " << e->pos().x() << e->pos().y(); } +void MultiTrackView::wheelEvent(QWheelEvent *event) +{ + if (event->modifiers() & Qt::ControlModifier) + { + int zoomValue = m_timeSlider->value(); + if (event->pixelDelta().y() > 0) + zoomValue++; + else + zoomValue--; + + if (zoomValue >= m_timeSlider->minimum() && zoomValue <= m_timeSlider->maximum()) + m_timeSlider->setValue(zoomValue); + return; + } + QGraphicsView::wheelEvent(event); +} + void MultiTrackView::slotHeaderClicked(QGraphicsSceneMouseEvent *event) { m_cursor->setPos(TRACK_WIDTH + event->pos().toPoint().x(), 0); diff --git a/ui/src/showmanager/multitrackview.h b/ui/src/showmanager/multitrackview.h index d3aba100a..fe4f56716 100644 --- a/ui/src/showmanager/multitrackview.h +++ b/ui/src/showmanager/multitrackview.h @@ -150,7 +150,8 @@ class MultiTrackView : public QGraphicsView bool m_snapToGrid; public slots: - void mouseReleaseEvent(QMouseEvent * e); + void mouseReleaseEvent(QMouseEvent *e); + void wheelEvent(QWheelEvent *event); protected slots: void slotHeaderClicked(QGraphicsSceneMouseEvent *event);