Skip to content

Commit

Permalink
Avoid translations in DataFilter expressions
Browse files Browse the repository at this point in the history
.. as reported on the forums, translations can rename metric
   names inadvertently. We avoid this by using the untranslated
   names in datafilter expressions.
  • Loading branch information
liversedge committed Aug 19, 2021
1 parent efba58b commit 39c135a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Core/DataFilter.cpp
Expand Up @@ -3101,8 +3101,7 @@ void DataFilter::configChanged(qint32)
const RideMetricFactory &factory = RideMetricFactory::instance();
for (int i=0; i<factory.metricCount(); i++) {
QString symbol = factory.metricName(i);
QString name = GlobalContext::context()->specialFields.internalName(factory.rideMetric(symbol)->name());

QString name = factory.rideMetric(symbol)->internalName();
rt.lookupMap.insert(name.replace(" ","_"), symbol);
rt.lookupType.insert(name.replace(" ","_"), true);
}
Expand Down

0 comments on commit 39c135a

Please sign in to comment.