Fix city search

This commit is contained in:
Victor Shcherb 2015-08-01 21:02:44 +02:00
parent d9973447e3
commit d822c78884

View file

@ -25,7 +25,7 @@ public class SearchRegionByNameActivity extends SearchByNameAbstractActivity<Reg
@Override @Override
public int compare(RegionAddressRepository lhs, public int compare(RegionAddressRepository lhs,
RegionAddressRepository rhs) { RegionAddressRepository rhs) {
return col.compare(lhs.getName(), rhs.getName()); return col.compare(getText(lhs), getText(rhs));
} }
}; };
} }
@ -68,7 +68,7 @@ public class SearchRegionByNameActivity extends SearchByNameAbstractActivity<Reg
@Override @Override
public void itemSelected(RegionAddressRepository obj) { public void itemSelected(RegionAddressRepository obj) {
((OsmandApplication) getApplication()).getSettings().setLastSearchedRegion(obj.getName(), obj.getEstimatedRegionCenter()); ((OsmandApplication) getApplication()).getSettings().setLastSearchedRegion(obj.getFileName(), obj.getEstimatedRegionCenter());
quitActivity(SearchCityByNameActivity.class); quitActivity(SearchCityByNameActivity.class);
} }