diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchCityByNameActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchCityByNameActivity.java index 34ae7372f5..a17cfc2385 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchCityByNameActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchCityByNameActivity.java @@ -173,10 +173,10 @@ public class SearchCityByNameActivity extends SearchByNameAbstractActivity @Override public void itemSelected(City obj) { settings.setLastSearchedCity(obj.getId(), obj.getName(region.useEnglishNames()), obj.getLocation()); - // Hardy: Looks like disabling this fixes the issue of the Search City dialogue becoming non-functional after the first tapping on a found village (not city) ... (while selected village is still remembered on the dialog for future reference!) - if (region.getCityById(obj.getId(), obj.getName(region.useEnglishNames())) == null) { - region.addCityToPreloadedList((City) obj); - } + // Hardy: Looks like disabling the next 3 lines fixes the issue of the Search City dialogue becoming non-functional after the first tapping on a found village (not city) ... (while selected village is still remembered on the dialog for future reference!) + //if (region.getCityById(obj.getId(), obj.getName(region.useEnglishNames())) == null) { + // region.addCityToPreloadedList((City) obj); + //} quitActivity(SearchStreetByNameActivity.class); } diff --git a/OsmAnd/src/net/osmand/plus/resources/RegionAddressRepositoryBinary.java b/OsmAnd/src/net/osmand/plus/resources/RegionAddressRepositoryBinary.java index 082af55049..d0bd945a9d 100644 --- a/OsmAnd/src/net/osmand/plus/resources/RegionAddressRepositoryBinary.java +++ b/OsmAnd/src/net/osmand/plus/resources/RegionAddressRepositoryBinary.java @@ -119,9 +119,7 @@ public class RegionAddressRepositoryBinary implements RegionAddressRepository { @Override public synchronized void addCityToPreloadedList(City city) { - if (!cities.containsValue(city)) { - cities.put(city.getId(), city); - } + cities.put(city.getId(), city); } @Override