From fedd4648780958508706fa54b9ce02e8aeb4f7f7 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Wed, 21 May 2014 01:33:27 +1000 Subject: [PATCH] Fixed overview Y-Axis graph scaling --- sleepyhead/Graphs/gSummaryChart.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/sleepyhead/Graphs/gSummaryChart.cpp b/sleepyhead/Graphs/gSummaryChart.cpp index ef473463..653e020b 100644 --- a/sleepyhead/Graphs/gSummaryChart.cpp +++ b/sleepyhead/Graphs/gSummaryChart.cpp @@ -406,18 +406,10 @@ void SummaryChart::paint(QPainter &painter, gGraph &w, const QRegion ®ion) qint64 xx = maxx - minx; float days = double(xx) / 86400000.0; - EventDataType maxy; - EventDataType miny; + EventDataType miny = m_physminy; + EventDataType maxy = m_physmaxy; - if (w.zoomY() == 0 && PROFILE.appearance->allowYAxisScaling()) { - maxy = m_physmaxy; - miny = m_physminy; - w.roundY(miny, maxy); - } else { - maxy = m_maxy; - miny = m_miny; - w.roundY(miny, maxy); - } + w.roundY(miny, maxy); EventDataType yy = maxy - miny; EventDataType ymult = float(height - 2) / yy;