From 65f8b14505b52e23615fe0eacf4735639c9bb1f5 Mon Sep 17 00:00:00 2001 From: sonora Date: Tue, 30 Dec 2014 13:19:03 +0100 Subject: [PATCH] finalize fix for distance update issue for SearchHistory and SearchAddressOnline --- .../plus/activities/search/SearchAddressOnlineFragment.java | 5 ++--- .../osmand/plus/activities/search/SearchHistoryFragment.java | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressOnlineFragment.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressOnlineFragment.java index 3b0954fe36..3e9861965e 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressOnlineFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressOnlineFragment.java @@ -123,7 +123,7 @@ public class SearchAddressOnlineFragment extends SherlockFragment implements Sea double lat = intent.getDoubleExtra(SearchActivity.SEARCH_LAT, 0); double lon = intent.getDoubleExtra(SearchActivity.SEARCH_LON, 0); if(lat != 0 || lon != 0){ - location = new LatLon(lat, lon); + adapter.location = new LatLon(lat, lon); } } if (location == null && getActivity() instanceof SearchActivity) { @@ -132,8 +132,7 @@ public class SearchAddressOnlineFragment extends SherlockFragment implements Sea if (location == null) { location = settings.getLastKnownMapLocation(); } - //TODO: Next line somehow breaks that distances are updated in list after origin is changed, but omitting it leads to no distences are shown upon first list view - //locationUpdate(location); + locationUpdate(location); } @Override diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchHistoryFragment.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchHistoryFragment.java index 7ada534fa1..8b7100571f 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchHistoryFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchHistoryFragment.java @@ -89,7 +89,6 @@ public class SearchHistoryFragment extends SherlockListFragment implements Sear if (location == null) { location = ((OsmandApplication) activity.getApplication()).getSettings().getLastKnownMapLocation(); } - //TODO: Next line somehow breaks that distances are updated in list after origin is changed, but omitting it leads to no distences are shown upon first list view locationUpdate(location); clearButton.setVisibility(historyAdapter.isEmpty() ? View.GONE : View.VISIBLE);