RidePlot: Correct min value for altitudes less than zero

fixes #527
This commit is contained in:
Damien
2013-04-02 23:39:44 +02:00
parent addf95e7b6
commit d487ba101f

View File

@@ -985,7 +985,7 @@ AllPlot::setYMax()
ymin = referencePlot->altCurve->minYValue();
ymax = qMax(ymin + 100, 1.05 * referencePlot->altCurve->maxYValue());
}
ymin = ( qRound(ymin) / 100 ) * 100;
ymin = (ymin < 0 ? -100 : 0) + ( qRound(ymin) / 100 ) * 100;
int axisHeight = qRound( plotLayout()->canvasRect().height() );
QFontMetrics labelWidthMetric = QFontMetrics( QwtPlot::axisFont(yLeft) );