Details - Metrics Tab (UI Nit)

... for metrics / time fields ("seconds") don't show units, since the
field is QTimeEdit (in hours)
This commit is contained in:
Joern
2014-06-29 12:33:14 +02:00
parent 5ddc96b15b
commit 9f0dd44fbd

View File

@@ -427,6 +427,9 @@ FormField::FormField(FieldDefinition field, RideMetadata *meta) : definition(fie
if (meta->sp.isMetric(field.name)) {
field.type = FIELD_DOUBLE; // whatever they say, we want a double!
units = meta->sp.rideMetric(field.name)->units(meta->context->athlete->useMetricUnits);
// remove "seconds", since the field will be a QTimeEdit field
if (units == "seconds" || units == tr("seconds")) units = "";
// layout units name for screen
if (units != "") units = QString(" (%1)").arg(units);
}