1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-10-06 14:53:21 +02:00

Fixed zoom speed issue on touchpads

This commit is contained in:
Martin Tůma 2017-04-01 06:56:50 +02:00
parent bfcc577f64
commit e6547d92f0

View File

@ -373,6 +373,12 @@ void PathView::zoom(const QPoint &pos, const Coordinates &c)
void PathView::wheelEvent(QWheelEvent *event) void PathView::wheelEvent(QWheelEvent *event)
{ {
qreal os, ns; qreal os, ns;
static int deg = 0;
deg += event->delta() / 8;
if (qAbs(deg) < 15)
return;
deg = 0;
os = _map->zoom(); os = _map->zoom();
Coordinates c = _map->xy2ll(mapToScene(event->pos())); Coordinates c = _map->xy2ll(mapToScene(event->pos()));