mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 11:45:53 +01:00
Cosmetics
This commit is contained in:
parent
548c03d543
commit
a7117361be
@ -348,8 +348,9 @@ void GraphView::wheelEvent(QWheelEvent *e)
|
|||||||
_zoom = (e->delta() > 0) ? _zoom * 1.25 : qMax(_zoom / 1.25, 1.0);
|
_zoom = (e->delta() > 0) ? _zoom * 1.25 : qMax(_zoom / 1.25, 1.0);
|
||||||
redraw();
|
redraw();
|
||||||
|
|
||||||
gr = _grid->boundingRect();
|
QRectF ngr(_grid->boundingRect());
|
||||||
QPointF npos(mapFromScene(QPointF(r.x() * gr.width(), r.y() * gr.height())));
|
QPointF npos(mapFromScene(QPointF(r.x() * ngr.width(),
|
||||||
|
r.y() * ngr.height())));
|
||||||
QScrollBar *sb = horizontalScrollBar();
|
QScrollBar *sb = horizontalScrollBar();
|
||||||
sb->setSliderPosition(sb->sliderPosition() + npos.x() - e->pos().x());
|
sb->setSliderPosition(sb->sliderPosition() + npos.x() - e->pos().x());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user