From a7117361bea46eba633ad65234660b5b5ebfa7c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Tue, 27 Aug 2019 20:18:39 +0200 Subject: [PATCH] Cosmetics --- src/GUI/graphview.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/GUI/graphview.cpp b/src/GUI/graphview.cpp index 72dd581a..9e0a68a7 100644 --- a/src/GUI/graphview.cpp +++ b/src/GUI/graphview.cpp @@ -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());