mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
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:
@@ -266,6 +266,9 @@ AllPlot::configChanged()
|
||||
|
||||
double width = 1.0;
|
||||
|
||||
boost::shared_ptr<QSettings> 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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user