1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-01-18 19:52:09 +01:00

Fixed graph axis ticks when range < min range and units != m

Fixes #278
This commit is contained in:
Martin Tůma 2020-03-14 23:55:57 +01:00
parent 98cd3c3922
commit 9ce6e16b60

View File

@ -274,8 +274,8 @@ void GraphView::redraw(const QSizeF &size)
rx = RangeF(bounds().left() * _xScale, bounds().right() * _xScale); rx = RangeF(bounds().left() * _xScale, bounds().right() * _xScale);
ry = RangeF(bounds().top() * _yScale + _yOffset, bounds().bottom() * _yScale ry = RangeF(bounds().top() * _yScale + _yOffset, bounds().bottom() * _yScale
+ _yOffset); + _yOffset);
if (ry.size() < _minYRange) if (ry.size() < _minYRange * _yScale)
ry.resize(_minYRange); ry.resize(_minYRange * _yScale);
_xAxis->setRange(rx); _xAxis->setRange(rx);
_yAxis->setRange(ry); _yAxis->setRange(ry);