Fix Imperial Show By Distance on AllPlot

The recent patch for allPlot zooming does not display the full plot
properly when the user has selected imperial units and is displaying
by distance (not time). This minor fix corrects this.
This commit is contained in:
Mark Liversedge
2010-07-28 20:23:01 +01:00
parent 2962fce0b7
commit efd4de62a1
2 changed files with 6 additions and 2 deletions

View File

@@ -395,8 +395,9 @@ AllPlotWindow::redrawFullPlot()
//fullPlot->setTitle("");
if (fullPlot->bydist)
fullPlot->setAxisScale(QwtPlot::xBottom, ride->ride()->dataPoints().first()->km,
ride->ride()->dataPoints().last()->km);
fullPlot->setAxisScale(QwtPlot::xBottom,
ride->ride()->dataPoints().first()->km * (fullPlot->useMetricUnits ? 1 : MILES_PER_KM),
ride->ride()->dataPoints().last()->km * (fullPlot->useMetricUnits ? 1 : MILES_PER_KM));
else
fullPlot->setAxisScale(QwtPlot::xBottom, ride->ride()->dataPoints().first()->secs/60,
ride->ride()->dataPoints().last()->secs/60);