From 08a704ec1b43c92db7c31c423a717b4e8d5315f1 Mon Sep 17 00:00:00 2001 From: Oleksiy Mishchenko Date: Wed, 22 May 2019 21:49:46 +0200 Subject: [PATCH] No reason to skip a datapoint if DFPM is null --- src/FileIO/CsvRideFile.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/FileIO/CsvRideFile.cpp b/src/FileIO/CsvRideFile.cpp index 0e311622d..03cbdedd5 100644 --- a/src/FileIO/CsvRideFile.cpp +++ b/src/FileIO/CsvRideFile.cpp @@ -780,18 +780,16 @@ RideFile *CsvFileReader::openRideFile(QFile &file, QStringList &errors, QList= 11 && ( dfpm > 0.0 || dfpmExists ) ) { dfpmExists = true; watts = dfpm; - - XDataPoint *p = new XDataPoint(); - p->secs = minutes*60.0; - p->km = km; - p->number[0] = line.section(',', 2, 2).toDouble(); // CALC-POWER - p->number[1] = line.section(',', 17, 17).toDouble(); // Rho - - ibikeSeries->datapoints.append(p); } else { watts = line.section(',', 2, 2).toDouble(); } + XDataPoint *p = new XDataPoint(); + p->secs = minutes*60.0; + p->km = km; + p->number[0] = line.section(',', 2, 2).toDouble(); // CALC-POWER + p->number[1] = line.section(',', 17, 17).toDouble(); // Rho + ibikeSeries->datapoints.append(p); cad = line.section(',', 4, 4).toDouble(); hr = line.section(',', 5, 5).toDouble();