Fix to previous commit

Conflicts:

	OsmAnd/src/net/osmand/plus/activities/LocalOpenstreetmapActivity.java
	Osmand-kernel/expat/expat_library
	Osmand-kernel/freetype/freetype_library
	Osmand-kernel/gif/gif_library
	Osmand-kernel/jpeg/jpeg_library
	Osmand-kernel/png/png_library
	Osmand-kernel/skia/skia_library
This commit is contained in:
Alexey Pelykh 2012-05-02 15:29:56 +03:00 committed by Victor Shcherb
parent fa7f1d4008
commit 3219f693eb

View file

@ -107,27 +107,27 @@ public class LocalOpenstreetmapActivity extends OsmandExpandableListActivity {
long packedPos = ((ExpandableListContextMenuInfo)item.getMenuInfo()).packedPosition;
int group = ExpandableListView.getPackedPositionGroup(packedPos);
int child = ExpandableListView.getPackedPositionChild(packedPos);
switch (item.getItemId()) {
case R.id.showpoi:
OsmandSettings settings = OsmandApplication.getSettings();
OpenstreetmapPoint info = (OpenstreetmapPoint) listAdapter.getChild(group, child);
settings.setMapLocationToShow(info.getLatitude(), info.getLongitude(), settings.getLastKnownMapZoom());
MapActivity.launchMapActivityMoveToTop(LocalOpenstreetmapActivity.this);
return true;
case R.id.deletepoimod:
info = (OpenstreetmapPoint) listAdapter.getChild(group, child);
listAdapter.delete(info);
return true;
case R.id.uploadpoimods:
List<OpenstreetmapPoint> list = listAdapter.data.get(group);
if (list != null) {
toUpload = list.toArray(new OpenstreetmapPoint[] {});
showDialog(DIALOG_PROGRESS_UPLOAD);
return true;
}
default:
return super.onContextItemSelected(item);
int itemId = item.getItemId();
if(itemId == R.id.showpoi) {
OsmandSettings settings = OsmandApplication.getSettings();
OpenstreetmapPoint info = (OpenstreetmapPoint) listAdapter.getChild(group, child);
settings.setMapLocationToShow(info.getLatitude(), info.getLongitude(), settings.getLastKnownMapZoom());
MapActivity.launchMapActivityMoveToTop(LocalOpenstreetmapActivity.this);
return true;
} else if(itemId == R.id.deletepoimod) {
OpenstreetmapPoint info = (OpenstreetmapPoint) listAdapter.getChild(group, child);
listAdapter.delete(info);
return true;
} else if(itemId == R.id.uploadpoimods) {
List<OpenstreetmapPoint> list = listAdapter.data.get(group);
if (list != null) {
toUpload = list.toArray(new OpenstreetmapPoint[] {});
showDialog(DIALOG_PROGRESS_UPLOAD);
return true;
}
}
return super.onContextItemSelected(item);
}
@Override