From 69d1830b8fd4fdddb9e52ce8360d3692cf035963 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Fri, 19 Jun 2020 12:49:16 +0300 Subject: [PATCH] Fix current recording track in gpx menu --- OsmAnd/src/net/osmand/plus/views/GPXLayer.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/views/GPXLayer.java b/OsmAnd/src/net/osmand/plus/views/GPXLayer.java index db5c732372..88381c5bee 100644 --- a/OsmAnd/src/net/osmand/plus/views/GPXLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/GPXLayer.java @@ -700,7 +700,12 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM return new PointDescription(PointDescription.POINT_TYPE_WPT, ((WptPt) o).name); } else if (o instanceof SelectedGpxPoint) { SelectedGpxFile selectedGpxFile = ((SelectedGpxPoint) o).getSelectedGpxFile(); - String name = formatName(Algorithms.getFileWithoutDirs(selectedGpxFile.getGpxFile().path)); + String name; + if (selectedGpxFile.isShowCurrentTrack()) { + name = view.getContext().getString(R.string.shared_string_currently_recording_track); + } else { + name = formatName(Algorithms.getFileWithoutDirs(selectedGpxFile.getGpxFile().path)); + } return new PointDescription(PointDescription.POINT_TYPE_GPX, name); } return null;