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
public int compare(RegionAddressRepository lhs,
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
public void itemSelected(RegionAddressRepository obj) {
((OsmandApplication) getApplication()).getSettings().setLastSearchedRegion(obj.getName(), obj.getEstimatedRegionCenter());
((OsmandApplication) getApplication()).getSettings().setLastSearchedRegion(obj.getFileName(), obj.getEstimatedRegionCenter());
quitActivity(SearchCityByNameActivity.class);
}