diff --git a/src/AllPlot.cpp b/src/AllPlot.cpp index 68bd902bf..30b0e1f06 100644 --- a/src/AllPlot.cpp +++ b/src/AllPlot.cpp @@ -266,6 +266,9 @@ AllPlot::configChanged() double width = 1.0; + boost::shared_ptr settings = GetApplicationSettings(); + useMetricUnits = (settings->value(GC_UNIT).toString() == "Metric"); + // placeholder for setting antialiasing, will come // in with a future patch. For now antialiasing is // not enabled since it can slow down plotting on diff --git a/src/AllPlotWindow.cpp b/src/AllPlotWindow.cpp index 63ffd34ba..df550165b 100644 --- a/src/AllPlotWindow.cpp +++ b/src/AllPlotWindow.cpp @@ -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);