Fix POI edit activity

This commit is contained in:
vshcherb 2013-11-03 17:46:22 +01:00
parent d195ebc054
commit fdfc13681d
3 changed files with 7 additions and 10 deletions

View file

@ -267,7 +267,6 @@ public class NavigatePointFragment extends SherlockFragment implements SearchAct
try {
double lat = convert(((TextView) view.findViewById(R.id.LatitudeEdit)).getText().toString());
double lon = convert(((TextView) view.findViewById(R.id.LongitudeEdit)).getText().toString());
TargetPointsHelper targetPointsHelper = ((OsmandApplication) getActivity().getApplication()).getTargetPointsHelper();
if(mode == ADD_TO_FAVORITE) {
Bundle b = new Bundle();
Dialog dlg = MapActivityActions.createAddFavouriteDialog(getActivity(), b);

View file

@ -236,15 +236,6 @@ public class SearchActivity extends SherlockFragmentActivity implements OsmAndLo
} else {
updateSearchPoint(latLon, getString(R.string.search_position_fixed), true);
}
} else if (requestCode == SearchPoiFilterActivity.REQUEST_POI_EDIT) {
for(WeakReference<Fragment> ref : fragList) {
Fragment f = ref.get();
if(f instanceof SearchPoiFilterActivity) {
if(!f.isDetached()) {
((SearchPoiFilterActivity) f).refreshPoiListAdapter();
}
}
}
}
}

View file

@ -102,6 +102,13 @@ public class SearchPoiFilterActivity extends SherlockListFragment implements Se
updateIntentToLaunch(newIntent);
startActivityForResult(newIntent, REQUEST_POI_EDIT);
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if(requestCode == REQUEST_POI_EDIT) {
refreshPoiListAdapter();
}
}
@Override
public void onListItemClick(ListView parent, View v, int position, long id) {