fix weekly summary bug where ride fails to appear

Without this patch, it will occationally be the case that a ride won't appear
in the weekly summary until the ride is itself selected (as opposed to just
selecting some other ride in the same week).
This commit is contained in:
Sean Rhea
2009-09-20 14:25:52 -07:00
parent 8b4fbf0491
commit 406cc4db43

View File

@@ -1085,11 +1085,14 @@ void MainWindow::generateWeeklySummary()
int day;
if (
(item->type() == RIDE_TYPE) &&
(item->ride) &&
((day = wstart.daysTo(item->dateTime.date())) >= 0) &&
(day < 7)
) {
item->htmlSummary(); // generates item->ride
if (!item->ride)
continue;
RideMetric *m;
item->htmlSummary(); // compute metrics
if ((m = item->metrics.value(weeklySeconds->name()))) {