Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorr.kuznetsov <r.kuznetsov@corp.mail.ru>2015-10-16 14:14:31 +0300
committerr.kuznetsov <r.kuznetsov@corp.mail.ru>2015-11-30 16:19:15 +0300
commitd16271378329caaa4321b33ecb1e26988daa4889 (patch)
tree8a250eae14dbd4b9239a580e1f84ea98ad47b18c /iphone/Maps/Settings
parente345cdfb8df864afd3e32c6fabba5f5bccc85a61 (diff)
Fixes after rebase
Diffstat (limited to 'iphone/Maps/Settings')
-rw-r--r--iphone/Maps/Settings/Preferences.mm9
-rw-r--r--iphone/Maps/Settings/SettingsViewController.mm2
2 files changed, 7 insertions, 4 deletions
diff --git a/iphone/Maps/Settings/Preferences.mm b/iphone/Maps/Settings/Preferences.mm
index b26fb744b3..402962e9df 100644
--- a/iphone/Maps/Settings/Preferences.mm
+++ b/iphone/Maps/Settings/Preferences.mm
@@ -22,12 +22,14 @@
+ (void)setup:(id)controller
{
Settings::Units u;
- if (!Settings::Get("Units", u))
+ if (!Settings::Get("Units", u))
{
// get system locale preferences
BOOL const isMetric = [[[NSLocale autoupdatingCurrentLocale] objectForKey:NSLocaleUsesMetricSystem] boolValue];
if (isMetric)
+ {
u = Settings::Metric;
+ }
else
{
u = Settings::Foot;
@@ -35,9 +37,10 @@
PrefDelegate * d = [[PrefDelegate alloc] init];
d.m_controller = controller;
}
-
+
Settings::Set("Units", u);
}
+ GetFramework().SetupMeasurementSystem();
}
-@end
+@end \ No newline at end of file
diff --git a/iphone/Maps/Settings/SettingsViewController.mm b/iphone/Maps/Settings/SettingsViewController.mm
index 1ff5d9e01e..dc6a28be37 100644
--- a/iphone/Maps/Settings/SettingsViewController.mm
+++ b/iphone/Maps/Settings/SettingsViewController.mm
@@ -223,7 +223,7 @@ Settings::Units unitsForIndex(NSInteger index)
withParameters:@{kStatValue : (units == Settings::Units::Metric ? kStatKilometers : kStatMiles)}];
Settings::Set("Units", units);
[tableView reloadSections:[NSIndexSet indexSetWithIndex:SectionMetrics] withRowAnimation:UITableViewRowAnimationFade];
- GetPlatform().SetupMeasurementSystem();
+ GetFramework().SetupMeasurementSystem();
}
else if (section == SectionRouting && indexPath.row == 1)
{