Fix search at wrong place

This commit is contained in:
Alexey Kulish 2017-03-08 18:33:23 +03:00
parent 65fd7d9827
commit cf16e3c57a

View file

@ -702,13 +702,6 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
boolean transliterate = app.getSettings().MAP_TRANSLITERATE_NAMES.get(); boolean transliterate = app.getSettings().MAP_TRANSLITERATE_NAMES.get();
searchHelper = app.getSearchUICore(); searchHelper = app.getSearchUICore();
searchUICore = searchHelper.getCore(); searchUICore = searchHelper.getCore();
if (newSearch) {
setResultCollection(null);
if (!phraseDefined) {
searchUICore.resetPhrase();
}
phraseDefined = false;
}
location = app.getLocationProvider().getLastKnownLocation(); location = app.getLocationProvider().getLastKnownLocation();
@ -735,6 +728,15 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
new LatLon(searchLatLon.getLatitude(), searchLatLon.getLongitude())); new LatLon(searchLatLon.getLatitude(), searchLatLon.getLongitude()));
settings = settings.setLang(locale, transliterate); settings = settings.setLang(locale, transliterate);
searchUICore.updateSettings(settings); searchUICore.updateSettings(settings);
if (newSearch) {
setResultCollection(null);
if (!phraseDefined) {
searchUICore.resetPhrase();
}
phraseDefined = false;
}
searchUICore.setOnSearchStart(new Runnable() { searchUICore.setOnSearchStart(new Runnable() {
@Override @Override
public void run() { public void run() {