mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user