Skip to content

Commit

Permalink
Fixed metric formatting in Compare Pane
Browse files Browse the repository at this point in the history
Fixes #2188
  • Loading branch information
amtriathlon committed Nov 26, 2016
1 parent 0db7b78 commit 4b88b61
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/Gui/ComparePane.cpp
Expand Up @@ -308,18 +308,9 @@ ComparePane::refreshTable()
QString strValue;

if (m) {
// get value and convert if needed
double value = metrics.getForSymbol(worklist[i])
* (context->athlete->useMetricUnits ? 1 : m->conversion())
+ (context->athlete->useMetricUnits ? 0 : m->conversionSum());

// use right precision
strValue = QString("%1").arg(value, 0, 'f', m->precision());

// or maybe its a duration (worry about local lang or translated)
if (m->units(true) == "seconds" || m->units(true) == tr("seconds"))
strValue = time_to_string_for_sorting(value);

// get the formated value
strValue = metrics.getStringForSymbol(worklist[i],
context->athlete->useMetricUnits);
}

// add to the table
Expand Down

0 comments on commit 4b88b61

Please sign in to comment.