1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 19:55:53 +01:00

Cosmetics

This commit is contained in:
Martin Tůma 2019-08-27 20:18:39 +02:00
parent 548c03d543
commit a7117361be

View File

@ -348,8 +348,9 @@ void GraphView::wheelEvent(QWheelEvent *e)
_zoom = (e->delta() > 0) ? _zoom * 1.25 : qMax(_zoom / 1.25, 1.0);
redraw();
gr = _grid->boundingRect();
QPointF npos(mapFromScene(QPointF(r.x() * gr.width(), r.y() * gr.height())));
QRectF ngr(_grid->boundingRect());
QPointF npos(mapFromScene(QPointF(r.x() * ngr.width(),
r.y() * ngr.height())));
QScrollBar *sb = horizontalScrollBar();
sb->setSliderPosition(sb->sliderPosition() + npos.x() - e->pos().x());