Fixed overview Y-Axis graph scaling

This commit is contained in:
Mark Watkins 2014-05-21 01:33:27 +10:00
parent 87b3ca2355
commit fedd464878

View File

@ -406,18 +406,10 @@ void SummaryChart::paint(QPainter &painter, gGraph &w, const QRegion &region)
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;