From 9ce6e16b60743401f76f20e7c9b9a0c545e18744 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sat, 14 Mar 2020 23:55:57 +0100 Subject: [PATCH] Fixed graph axis ticks when range < min range and units != m Fixes #278 --- src/GUI/graphview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GUI/graphview.cpp b/src/GUI/graphview.cpp index 54302690..2e88811e 100644 --- a/src/GUI/graphview.cpp +++ b/src/GUI/graphview.cpp @@ -274,8 +274,8 @@ void GraphView::redraw(const QSizeF &size) rx = RangeF(bounds().left() * _xScale, bounds().right() * _xScale); ry = RangeF(bounds().top() * _yScale + _yOffset, bounds().bottom() * _yScale + _yOffset); - if (ry.size() < _minYRange) - ry.resize(_minYRange); + if (ry.size() < _minYRange * _yScale) + ry.resize(_minYRange * _yScale); _xAxis->setRange(rx); _yAxis->setRange(ry);