Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2014-12-30 11:20:41 +01:00
commit b2b8851a7b

View file

@ -89,6 +89,7 @@ public class SearchHistoryFragment extends SherlockListFragment implements Sear
if (location == null) { if (location == null) {
location = ((OsmandApplication) activity.getApplication()).getSettings().getLastKnownMapLocation(); location = ((OsmandApplication) activity.getApplication()).getSettings().getLastKnownMapLocation();
} }
locationUpdate(location);
clearButton.setVisibility(historyAdapter.isEmpty() ? View.GONE : View.VISIBLE); clearButton.setVisibility(historyAdapter.isEmpty() ? View.GONE : View.VISIBLE);
} }
@ -97,8 +98,6 @@ public class SearchHistoryFragment extends SherlockListFragment implements Sear
public void locationUpdate(LatLon l) { public void locationUpdate(LatLon l) {
location = l; location = l;
if(historyAdapter != null) { if(historyAdapter != null) {
//historyAdapter.notifyDataSetChanged();
//This did not update distances when origin was changed, try this:
historyAdapter.updateLocation(l); historyAdapter.updateLocation(l);
} }
} }