From dd2441c02480e7bedd137aea88c2fac67e08bee0 Mon Sep 17 00:00:00 2001 From: PavelRatushny Date: Fri, 29 Dec 2017 11:41:09 +0200 Subject: [PATCH] Change title and type strings in transport route controller --- .../controllers/TransportRouteController.java | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) 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);