mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Metric/Imperial bug in Realtime
Display of speed and distance is in kph, regardless of the unit of measure user preferences. This patch fixes that.
This commit is contained in:
@@ -115,7 +115,13 @@ DialWindow::telemetryUpdate(const RealtimeData &rtData)
|
||||
}
|
||||
break;
|
||||
|
||||
case RealtimeData::Speed:
|
||||
if (!mainWindow->useMetricUnits) value *= MILES_PER_KM;
|
||||
valueLabel->setText(QString("%1").arg(value, 0, 'f', 1));
|
||||
break;
|
||||
|
||||
case RealtimeData::Distance:
|
||||
if (!mainWindow->useMetricUnits) value *= MILES_PER_KM;
|
||||
valueLabel->setText(QString("%1").arg(value, 0, 'f', 3));
|
||||
break;
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "RealtimeData.h" // for realtimedata structure
|
||||
|
||||
#include "Settings.h" // for realtimedata structure
|
||||
#include "Units.h" // for realtimedata structure
|
||||
#include "Colors.h" // for realtimedata structure
|
||||
|
||||
class DialWindow : public GcWindow
|
||||
|
||||
Reference in New Issue
Block a user