Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2015-01-03 21:08:11 +01:00
commit 34ef3de704

View file

@ -162,6 +162,7 @@ public class SearchActivity extends SherlockFragmentActivity implements OsmAndLo
Intent intent = getIntent();
OsmandSettings settings = ((OsmandApplication) getApplication()).getSettings();
LatLon last = settings.getLastKnownMapLocation();
if (intent != null) {
double lat = intent.getDoubleExtra(SEARCH_LAT, 0);
double lon = intent.getDoubleExtra(SEARCH_LON, 0);
@ -169,7 +170,8 @@ public class SearchActivity extends SherlockFragmentActivity implements OsmAndLo
LatLon l = new LatLon(lat, lon);
if(!Algorithms.objectEquals(reqSearchPoint, l)){
reqSearchPoint = l;
if (Algorithms.objectEquals(reqSearchPoint, settings.getLastKnownMapLocation())) {
//if (Algorithms.objectEquals(reqSearchPoint, settings.getLastKnownMapLocation())) {
if ((Math.abs(lat - last.getLatitude()) < 0.00001) && (Math.abs(lon - last.getLongitude()) < 0.00001)) {
updateSearchPoint(reqSearchPoint, getString(R.string.select_search_position) + " " + getString(R.string.search_position_map_view), false);
} else {
updateSearchPoint(reqSearchPoint, getString(R.string.select_search_position) + " ", true);
@ -178,7 +180,7 @@ public class SearchActivity extends SherlockFragmentActivity implements OsmAndLo
}
}
if(searchPoint == null){
LatLon last = settings.getLastKnownMapLocation();
//LatLon last = settings.getLastKnownMapLocation();
if(!Algorithms.objectEquals(reqSearchPoint, last)){
reqSearchPoint = last;
updateSearchPoint(last, getString(R.string.select_search_position) + " " + getString(R.string.search_position_map_view), false);