Fix icons in osm edits context menu

This commit is contained in:
PavelRatushnyi 2017-12-22 15:20:15 +02:00
parent 6c7bd63cb3
commit f44b09fc0c

View file

@ -143,7 +143,7 @@ public class EditPOIMenuController extends MenuController {
} }
@Override @Override
public int getAdditionalInfoIconRes() { public int getLeftIconId() {
if (osmPoint.getGroup() == OsmPoint.Group.POI) { if (osmPoint.getGroup() == OsmPoint.Group.POI) {
OpenstreetmapPoint osmP = (OpenstreetmapPoint) osmPoint; OpenstreetmapPoint osmP = (OpenstreetmapPoint) osmPoint;
int iconResId = 0; 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 @Override
public boolean needStreetName() { public boolean needStreetName() {
return false; return false;