diff --git a/OsmAnd/no_translate.xml b/OsmAnd/no_translate.xml index 1c732c9d56..9a499ff9d8 100644 --- a/OsmAnd/no_translate.xml +++ b/OsmAnd/no_translate.xml @@ -11,6 +11,10 @@ --> + + - New road indexes (including) + - + UA-28342846-2 10 true diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java index 289554c5ab..c5299202f7 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java @@ -171,10 +171,10 @@ public class OsmEditingPlugin extends OsmandPlugin { .execute((Amenity) selectedObj); // TODO implement delete // getPoiActions(mapActivity).showDeleteDialog((Amenity) selectedObj); - }//} else if (resId == R.string.poi_context_menu_modify) { + } else if (resId == R.string.poi_context_menu_modify) { // TODO implement edit // getPoiActions(mapActivity).showEditDialog((Amenity) selectedObj); -// } + } return true; } }; diff --git a/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java b/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java index f0fe5128b7..eaa7f2147b 100644 --- a/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java @@ -43,6 +43,7 @@ public class ContextMenuLayer extends OsmandMapLayer { public PointDescription getObjectName(Object o); public boolean disableSingleTap(); + public boolean disableLongPressOnMap(); } @@ -229,20 +230,17 @@ public class ContextMenuLayer extends OsmandMapLayer { } if (disableLongPressOnMap()) { - LatLon latLon = selectObjectsForContextMenu(tileBox, point); - if (latLon != null) { - String description = getSelectedObjectDescription(); - setLocation(latLon, description); - view.refreshMap(); - return true; - } else { - return false; - } + return false; + } + LatLon latLon = selectObjectsForContextMenu(tileBox, point); + if (latLon != null) { + String description = getSelectedObjectDescription(); + setLocation(latLon, description); + } else { + final double lat = tileBox.getLatFromPixel((int) point.x, (int) point.y); + final double lon = tileBox.getLonFromPixel((int) point.x, (int) point.y); + setLocation(new LatLon(lat, lon), null); } - - final double lat = tileBox.getLatFromPixel((int) point.x, (int) point.y); - final double lon = tileBox.getLonFromPixel((int) point.x, (int) point.y); - setLocation(new LatLon(lat, lon), null); view.refreshMap(); return true; } @@ -262,8 +260,8 @@ public class ContextMenuLayer extends OsmandMapLayer { public boolean disableLongPressOnMap() { boolean res = false; - for(OsmandMapLayer lt : view.getLayers()){ - if(lt instanceof ContextMenuLayer.IContextMenuProvider) { + for (OsmandMapLayer lt : view.getLayers()) { + if (lt instanceof ContextMenuLayer.IContextMenuProvider) { if (((IContextMenuProvider) lt).disableLongPressOnMap()) { res = true; break;