Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove overridingMetricSystem after DRIVING_REGION change #21594

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1047,14 +1047,6 @@ public ApplicationMode parseString(String s) {
public final OsmandPreference<DrivingRegion> DRIVING_REGION = new EnumStringPreference<DrivingRegion>(this,
"default_driving_region", DrivingRegion.EUROPE_ASIA, DrivingRegion.values()) {

public boolean setValue(Object prefs, DrivingRegion val) {
boolean overrideMetricSystem = !DRIVING_REGION_AUTOMATIC.getValue(prefs, DRIVING_REGION_AUTOMATIC.getDefaultValue());
if (overrideMetricSystem && val != null) {
METRIC_SYSTEM.setValue(prefs, val.defMetrics);
}
return super.setValue(prefs, val);
}

public DrivingRegion getDefaultValue() {
return DrivingRegion.getDrivingRegionByLocale();
}
Expand Down
Loading