forked from upstream-mirrors/OpenTracks
When export, use the last valid track point as the end point.
This commit is contained in:
@@ -240,7 +240,8 @@ public class TrackWriter {
|
|||||||
wroteSegment = false;
|
wroteSegment = false;
|
||||||
}
|
}
|
||||||
if (wroteTrack) {
|
if (wroteTrack) {
|
||||||
trackFormatWriter.writeEndTrack(locationFactory.lastLocation);
|
Location lastValidTrackPoint = myTracksProviderUtils.getLastValidTrackPoint(track.getId());
|
||||||
|
trackFormatWriter.writeEndTrack(lastValidTrackPoint);
|
||||||
} else {
|
} else {
|
||||||
// Write an empty track
|
// Write an empty track
|
||||||
trackFormatWriter.writeBeginTrack(null);
|
trackFormatWriter.writeBeginTrack(null);
|
||||||
|
|||||||
Reference in New Issue
Block a user