mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-27 20:58:47 +00:00
Use horizontal mouse wheel for zoomed panning
Signed-off-by: Anton Lundin <glance@ac2.se>
This commit is contained in:
parent
bfe61b2dff
commit
b6111714b3
2 changed files with 9 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
||||||
desktop: add divemode as a possible dive list column
|
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
|
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: 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
|
equipment: include unused cylinders in merged dive if the preference is enabled
|
||||||
|
|
|
@ -322,6 +322,14 @@ void ProfileWidget2::wheelEvent(QWheelEvent *event)
|
||||||
{
|
{
|
||||||
if (!d)
|
if (!d)
|
||||||
return;
|
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)
|
if (panning)
|
||||||
return; // No change in zoom level while panning.
|
return; // No change in zoom level while panning.
|
||||||
if (event->buttons() == Qt::LeftButton)
|
if (event->buttons() == Qt::LeftButton)
|
||||||
|
|
Loading…
Reference in a new issue