Merge pull request #647 from dubrovskip/master

Tour settings save format fix
This commit is contained in:
vshcherb 2014-05-23 22:46:16 +02:00
commit 1d0fbad437
2 changed files with 7 additions and 4 deletions

View file

@ -110,13 +110,12 @@ public class OsmandSettings {
protected OsmandSettings(OsmandApplication clientContext, SettingsAPI settinsAPI) {
ctx = clientContext;
this.settingsAPI = settinsAPI;
initPrefs();
}
private void initPrefs() {
globalPreferences = settingsAPI.getPreferenceObject(SHARED_PREFERENCES_NAME);
// start from default settings
currentMode = ApplicationMode.DEFAULT;
defaultProfilePreferences = getProfilePreferences(ApplicationMode.DEFAULT);
profilePreferences = defaultProfilePreferences;
currentMode = readApplicationMode();
profilePreferences = getProfilePreferences(currentMode);
}
@ -127,6 +126,7 @@ public class OsmandSettings {
public void setSettingsAPI(SettingsAPI settingsAPI) {
this.settingsAPI = settingsAPI;
initPrefs();
}
public SettingsAPI getSettingsAPI() {

View file

@ -113,6 +113,9 @@ public class SherpafyCustomization extends OsmAndAppCustomization {
}
}
}
if (selectedName == null) {
app.getSettings().setSettingsAPI(originalSettings.getSettingsAPI());
}
}
}
this.tourPresent = tourPresent;