diff --git a/src/data/fitparser.cpp b/src/data/fitparser.cpp index 02060b9e..6de4b89e 100644 --- a/src/data/fitparser.cpp +++ b/src/data/fitparser.cpp @@ -478,8 +478,7 @@ bool FITParser::parse(QFile *file, QList &tracks, if (!parseRecord(ctx)) return false; - tracks.append(TrackData()); - tracks.last().append(ctx.segment); + tracks.append(ctx.segment); return true; } diff --git a/src/data/igcparser.cpp b/src/data/igcparser.cpp index 857d5bdf..63e965d3 100644 --- a/src/data/igcparser.cpp +++ b/src/data/igcparser.cpp @@ -247,8 +247,7 @@ bool IGCParser::parse(QFile *file, QList &tracks, ctx.date = QDate(1970, 1, 1); } if (!track) { - tracks.append(TrackData()); - tracks.last().append(SegmentData()); + tracks.append(SegmentData()); ctx.time = QTime(0, 0); track = true; } diff --git a/src/data/twonavparser.cpp b/src/data/twonavparser.cpp index 57206176..700ca954 100644 --- a/src/data/twonavparser.cpp +++ b/src/data/twonavparser.cpp @@ -151,8 +151,7 @@ bool TwoNavParser::parse(QFile *file, QList &tracks, } if (!track) { - tracks.append(TrackData()); - tracks.last().append(SegmentData()); + tracks.append(SegmentData()); track = true; }