diff --git a/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java index 39f3cf3d92..f227cb9b1e 100644 --- a/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java @@ -853,7 +853,7 @@ public class OsmandSettings { public boolean setValue(Object prefs, DrivingRegion val) { boolean overrideMetricSystem = !DRIVING_REGION_AUTOMATIC.getValue(prefs, DRIVING_REGION_AUTOMATIC.getDefaultValue()); if (overrideMetricSystem && val != null) { - METRIC_SYSTEM.set(val.defMetrics); + METRIC_SYSTEM.setValue(prefs, val.defMetrics); } return super.setValue(prefs, val); } @@ -866,7 +866,7 @@ public class OsmandSettings { // this value string is synchronized with settings_pref.xml preference name // cache of metrics constants as they are used very often - public final OsmandPreference METRIC_SYSTEM = new EnumStringPreference(this, + public final EnumStringPreference METRIC_SYSTEM = (EnumStringPreference) new EnumStringPreference(this, "default_metric_system", MetricsConstants.KILOMETERS_AND_METERS, MetricsConstants.values()) { protected MetricsConstants getDefaultValue() { return DRIVING_REGION.get().defMetrics;