Fix ErgFilPlot axis setting

When you select an ergfile the axis for the workout
plot is not set, this often results in a plot with
large amounts of white space to the right of the plot.
This commit is contained in:
Mark Liversedge
2011-08-27 09:48:34 +01:00
parent deffbcc52a
commit f699b5f01c

View File

@@ -59,6 +59,7 @@ ErgFilePlot::ErgFilePlot(QList<ErgFilePoint> *data)
LodCurve = new QwtPlotCurve("Course Load");
QPen Lodpen = QPen(Qt::blue, 1.0);
LodCurve->setPen(Lodpen);
LodCurve->setData(lodData);
LodCurve->attach(this);
LodCurve->setYAxis(QwtPlot::yLeft);
@@ -112,6 +113,9 @@ ErgFilePlot::setData(ErgFile *ergfile)
Marks.append(add);
}
// set the axis so we use all the screen estate
if ((*courseData).count()) setAxisScale(xBottom, (double)0, (double)(*courseData).last().x);
}
}