diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TransportRouteController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TransportRouteController.java index 371acd5880..403b36b5de 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TransportRouteController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TransportRouteController.java @@ -121,15 +121,7 @@ public class TransportRouteController extends MenuController { @Override public String getTypeStr() { - if (transportRoute.refStop != null && !TextUtils.isEmpty(transportRoute.refStop.getName())) { - return transportRoute.refStop.getName(); - } else if (transportRoute.stop != null && !TextUtils.isEmpty(transportRoute.stop.getName())) { - return transportRoute.stop.getName(); - } else if (!TextUtils.isEmpty(getPointDescription().getTypeName())) { - return getPointDescription().getTypeName(); - } else { - return getStopType(); - } + return getPointDescription().getName(); } private String getStopType() { @@ -220,6 +212,19 @@ public class TransportRouteController extends MenuController { return -1; } + @Override + public String getNameStr() { + if (transportRoute.refStop != null && !TextUtils.isEmpty(transportRoute.refStop.getName())) { + return transportRoute.refStop.getName(); + } else if (transportRoute.stop != null && !TextUtils.isEmpty(transportRoute.stop.getName())) { + return transportRoute.stop.getName(); + } else if (!TextUtils.isEmpty(getPointDescription().getTypeName())) { + return getPointDescription().getTypeName(); + } else { + return getStopType(); + } + } + @Override public void addPlainMenuItems(String typeStr, PointDescription pointDescription, final LatLon latLon) { super.addPlainMenuItems(typeStr, pointDescription, latLon);