From f699b5f01cbbddf2a50b4c8dd6109a91a998f4af Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Sat, 27 Aug 2011 09:48:34 +0100 Subject: [PATCH] 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. --- src/ErgFilePlot.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ErgFilePlot.cpp b/src/ErgFilePlot.cpp index a21d047f9..dfea822d4 100644 --- a/src/ErgFilePlot.cpp +++ b/src/ErgFilePlot.cpp @@ -59,6 +59,7 @@ ErgFilePlot::ErgFilePlot(QList *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); } }