From c5fef58b2ecfd0b7800e7bef11ebb2f60e7e4d0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sun, 10 Mar 2019 10:23:39 +0100 Subject: [PATCH] Fixed IGC date boundary crossing Fixes #192 --- src/data/igcparser.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/data/igcparser.cpp b/src/data/igcparser.cpp index dbad2ad5..8dc82916 100644 --- a/src/data/igcparser.cpp +++ b/src/data/igcparser.cpp @@ -126,13 +126,11 @@ bool IGCParser::readBRecord(SegmentData &segment, const char *line, int len) { qreal lat, lon, ele; - QTime time; - if (len < 35) return false; - if (!readTimestamp(line + 1, time)) { + if (!readTimestamp(line + 1, _time)) { _errorString = "Invalid timestamp"; return false; } @@ -151,11 +149,6 @@ bool IGCParser::readBRecord(SegmentData &segment, const char *line, return false; } - - if (time < _time) - _date = _date.addDays(1); - _time = time; - Trackpoint t(Coordinates(lon, lat)); t.setTimestamp(QDateTime(_date, _time, Qt::UTC)); t.setElevation(ele);