GPX exporter: only export trkseq if it actually contains data.

Fixes #1291.
This commit is contained in:
Dennis Guse
2022-06-21 18:56:05 +02:00
parent ae2a97576b
commit 8137ec8de2
@@ -146,13 +146,10 @@ public class GPXTrackExporter implements TrackExporter {
switch (trackPoint.getType()) {
case SEGMENT_START_MANUAL:
if (wroteSegment) writeCloseSegment();
writeOpenSegment();
wroteSegment = true;
Log.i(TAG, "Exporting " + TrackPoint.Type.SEGMENT_START_MANUAL.name() + " is not supported.");
break;
case SEGMENT_END_MANUAL:
writeCloseSegment();
if (wroteSegment) writeCloseSegment();
wroteSegment = false;
Log.i(TAG, "Exporting " + TrackPoint.Type.SEGMENT_END_MANUAL.name() + " is not supported.");
break;