mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 08:38:45 +00:00
Fix Metric/Imperial - conversion issues
In LTM Plot and on Summary Windows conversion ... data already converted for the curves was converted again ... for "Best" Summary the conversion was missing Referring to issues #1067 #1071 (see also comments on issue #1069
This commit is contained in:
@@ -1006,8 +1006,7 @@ LTMPlot::setData(LTMSettings *set)
|
||||
if (metricDetail.uunits == "km") precision=0;
|
||||
|
||||
// we have a metric so lets be precise ...
|
||||
labelString = QString("%1").arg(value * (context->athlete->useMetricUnits ? 1 : m->conversion())
|
||||
+ (context->athlete->useMetricUnits ? 0 : m->conversionSum()), 0, 'f', precision);
|
||||
labelString = QString("%1").arg(value, 0, 'f', precision);
|
||||
|
||||
} else {
|
||||
// no precision
|
||||
@@ -1857,8 +1856,7 @@ LTMPlot::setCompareData(LTMSettings *set)
|
||||
if (metricDetail.uunits == "km") precision=0;
|
||||
|
||||
// we have a metric so lets be precise ...
|
||||
labelString = QString("%1").arg(value * (context->athlete->useMetricUnits ? 1 : m->conversion())
|
||||
+ (context->athlete->useMetricUnits ? 0 : m->conversionSum()), 0, 'f', precision);
|
||||
labelString = QString("%1").arg(value , 0, 'f', precision);
|
||||
|
||||
} else {
|
||||
// no precision
|
||||
@@ -2019,8 +2017,7 @@ LTMPlot::setCompareData(LTMSettings *set)
|
||||
if (metricDetail.uunits == "km") precision=0;
|
||||
|
||||
// we have a metric so lets be precise ...
|
||||
labelString = QString("%1").arg(value * (context->athlete->useMetricUnits ? 1 : m->conversion())
|
||||
+ (context->athlete->useMetricUnits ? 0 : m->conversionSum()), 0, 'f', precision);
|
||||
labelString = QString("%1").arg(value, 0, 'f', precision);
|
||||
|
||||
} else {
|
||||
// no precision
|
||||
|
||||
Reference in New Issue
Block a user