Fix current recording track in gpx menu

This commit is contained in:
Vitaliy 2020-06-19 12:49:16 +03:00
parent 5d0e9c7503
commit 69d1830b8f

View file

@ -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;