W'bal on ErgPlot always starts at 0

.. so you can see quickly how 'deep' a workout will
   take you as you scroll through them.
This commit is contained in:
Mark Liversedge
2014-07-02 23:42:10 +01:00
parent 1d2dc7e1c9
commit 86576895c9

View File

@@ -393,7 +393,7 @@ ErgFilePlot::setData(ErgFile *ergfile)
calculator.setErg(ergfile);
setAxisTitle(QwtAxisId(QwtAxis::yRight, 3), tr("W' Balance (j)"));
setAxisScale(QwtAxisId(QwtAxis::yRight, 3),calculator.minY-1000,calculator.maxY+1000);
setAxisScale(QwtAxisId(QwtAxis::yRight, 3),qMin(double(calculator.minY-1000),double(0)),calculator.maxY+1000);
setAxisLabelAlignment(QwtAxisId(QwtAxis::yRight, 3),Qt::AlignVCenter);
// and the values ... but avoid sharing!