Fix bug with reset

This commit is contained in:
Victor Shcherb 2015-07-03 12:30:37 +03:00
parent 004a44b073
commit 5b1aff575d
3 changed files with 7 additions and 2 deletions

View file

@ -359,7 +359,11 @@ public class OsmandSettings {
@Override @Override
public void resetToDefault(){ public void resetToDefault(){
set(getDefaultValue()); T o = defaultValue;
if(defaultValues != null && defaultValues.containsKey(currentMode)){
o = defaultValues.get(currentMode);
}
set(o);
} }
@Override @Override

View file

@ -279,6 +279,7 @@ public class EditPOIFilterActivity extends OsmandListActivity {
filter.setTypeToAccept(model, false); filter.setTypeToAccept(model, false);
helper.editPoiFilter(filter); helper.editPoiFilter(filter);
} }
notifyDataSetChanged();
} }
}); });
} }

View file

@ -246,7 +246,7 @@ public class MapWidgetRegistry {
public boolean onContextMenuClick(ArrayAdapter<?> a, int itemId, int pos, boolean isChecked) { public boolean onContextMenuClick(ArrayAdapter<?> a, int itemId, int pos, boolean isChecked) {
pref.set(!pref.get()); pref.set(!pref.get());
map.updateApplicationModeSettings(); map.updateApplicationModeSettings();
a.notifyDataSetInvalidated(); a.notifyDataSetChanged();;
return false; return false;
} }
}; };