From f44b09fc0c0593942a8f5dd739b05d6a472ae5f8 Mon Sep 17 00:00:00 2001 From: PavelRatushnyi Date: Fri, 22 Dec 2017 15:20:15 +0200 Subject: [PATCH] Fix icons in osm edits context menu --- .../osmand/plus/osmedit/EditPOIMenuController.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuController.java b/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuController.java index 5096886314..0a2de925a2 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuController.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuController.java @@ -143,7 +143,7 @@ public class EditPOIMenuController extends MenuController { } @Override - public int getAdditionalInfoIconRes() { + public int getLeftIconId() { if (osmPoint.getGroup() == OsmPoint.Group.POI) { OpenstreetmapPoint osmP = (OpenstreetmapPoint) osmPoint; int iconResId = 0; @@ -174,6 +174,17 @@ public class EditPOIMenuController extends MenuController { } } + @Override + public int getAdditionalInfoIconRes() { + if (osmPoint.getAction() == Action.DELETE) { + return R.drawable.ic_action_type_delete_16; + } else if (osmPoint.getAction() == Action.MODIFY || osmPoint.getAction() == Action.REOPEN) { + return R.drawable.ic_action_type_edit_16; + } else { + return R.drawable.ic_action_type_add_16; + } + } + @Override public boolean needStreetName() { return false;