diff --git a/CHANGELOG.md b/CHANGELOG.md index 954f3abf9..1c6c42c47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ desktop: add divemode as a possible dive list column +profile-widget: Now zomed in profiles can be panned with horizontal scroll. desktop: hide only events with the same severity when 'Hide similar events' is used equipment: mark gas mixes reported by the dive computer as 'inactive' as 'not used' equipment: include unused cylinders in merged dive if the preference is enabled diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index 22ac062ca..b90105187 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -322,6 +322,14 @@ void ProfileWidget2::wheelEvent(QWheelEvent *event) { if (!d) return; + if (event->angleDelta().x() && zoomLevel > 0) { + double oldPos = zoomedPosition; + zoomedPosition = profileScene->calcZoomPosition(calcZoom(zoomLevel), + oldPos, + oldPos - event->angleDelta().x()); + if (oldPos != zoomedPosition) + plotDive(d, dc, RenderFlags::Instant | RenderFlags::DontRecalculatePlotInfo); + } if (panning) return; // No change in zoom level while panning. if (event->buttons() == Qt::LeftButton)