Altitude on a fullplot scaling

.. by making it fill the screen it suggests rides have more ascent
   than they actually do. So default to a minimum of 0-500m for the
   altitude scale.
This commit is contained in:
Mark Liversedge
2014-07-25 15:42:52 +01:00
parent b6340d92be
commit 051f2fe5ad

View File

@@ -2019,10 +2019,10 @@ AllPlot::setYMax()
if (referencePlot == NULL) {
ymin = standard->altCurve->minYValue();
ymax = qMax(ymin + 100, 1.05 * standard->altCurve->maxYValue());
ymax = qMax(500.000, 1.05 * standard->altCurve->maxYValue());
} else {
ymin = referencePlot->standard->altCurve->minYValue();
ymax = qMax(ymin + 100, 1.05 * referencePlot->standard->altCurve->maxYValue());
ymax = qMax(500.000, 1.05 * referencePlot->standard->altCurve->maxYValue());
}
ymin = (ymin < 0 ? -100 : 0) + ( qRound(ymin) / 100 ) * 100;