From 9cd3f3c4a361d019266754415ba2389b32b39a0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Wed, 13 Oct 2021 20:43:42 +0200 Subject: [PATCH] Fixed broken display of graphs with X-axis not starting at 0 --- 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 9837f962..d6bd954a 100644 --- a/src/GUI/graphview.cpp +++ b/src/GUI/graphview.cpp @@ -324,8 +324,8 @@ void GraphView::redraw(const QSizeF &size) updateSliderPosition(); _info->setPos(QPointF(r.width()/2 - IW(_info)/2 - (IW(_yAxisLabel) - + IW(_yAxis))/2, r.top() - IH(_info) - my.height())); - _xAxisLabel->setPos(QPointF(r.width()/2 - IW(_xAxisLabel)/2, + + IW(_yAxis))/2 + r.left(), r.top() - IH(_info) - my.height())); + _xAxisLabel->setPos(QPointF(r.width()/2 - IW(_xAxisLabel)/2 + r.left(), r.bottom() + mx.height())); _yAxisLabel->setPos(QPointF(r.left() - my.width() - IW(_yAxisLabel), r.bottom() - (r.height()/2 + IH(_yAxisLabel)/2)));