From c848726f0ca5bc7b6710804f9554ccc124ac5d14 Mon Sep 17 00:00:00 2001 From: Sean Rhea Date: Sun, 1 Nov 2009 12:45:43 -0500 Subject: [PATCH] let the factory call fillInIntervals --- src/AllPlot.cpp | 1 - src/RideFile.cpp | 5 ++++- src/RideItem.cpp | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/AllPlot.cpp b/src/AllPlot.cpp index 24e7bd902..7fc9418e5 100644 --- a/src/AllPlot.cpp +++ b/src/AllPlot.cpp @@ -395,7 +395,6 @@ AllPlot::recalc() } d_mrk.clear(); if (rideItem->ride) { - rideItem->ride->fillInIntervals(); foreach(const RideFileInterval &interval, rideItem->ride->intervals()) { QwtPlotMarker *mrk = new QwtPlotMarker; d_mrk.append(mrk); diff --git a/src/RideFile.cpp b/src/RideFile.cpp index 97291ffd0..839736254 100644 --- a/src/RideFile.cpp +++ b/src/RideFile.cpp @@ -153,7 +153,10 @@ RideFile *RideFileFactory::openRideFile(QFile &file, suffix.remove(0, dot + 1); RideFileReader *reader = readFuncs_.value(suffix.toLower()); assert(reader); - return reader->openRideFile(file, errors); + RideFile *result = reader->openRideFile(file, errors); + if (result) + result->fillInIntervals(); + return result; } QStringList RideFileFactory::listRideFiles(const QDir &dir) const diff --git a/src/RideItem.cpp b/src/RideItem.cpp index eeaae5312..a6cf2bde3 100644 --- a/src/RideItem.cpp +++ b/src/RideItem.cpp @@ -281,7 +281,6 @@ RideItem::htmlSummary() QString intervals = ""; double secs_delta = ride->recIntSecs(); - ride->fillInIntervals(); foreach (RideFileInterval interval, ride->intervals()) { int i = ride->intervalBegin(interval); assert(i < ride->dataPoints().size());