From a33dff05e59d3ff35699da11a4ff6083682aef06 Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Fri, 19 Dec 2014 22:35:54 +0000 Subject: [PATCH] Show TSB add time of athlete best .. on ridesummary --- src/RideSummaryWindow.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/RideSummaryWindow.cpp b/src/RideSummaryWindow.cpp index 3cfcaba8e..81d5d1a54 100644 --- a/src/RideSummaryWindow.cpp +++ b/src/RideSummaryWindow.cpp @@ -503,7 +503,7 @@ RideSummaryWindow::htmlSummary() case 3: metricsList = metricColumn; addPMC=true; break; } - if (addPMC) { + if (ridesummary && addPMC) { // get the Coggan PMC and add values for date of ride PMCData *pmc = context->athlete->getPMCFor("coggan_tss"); @@ -716,6 +716,9 @@ RideSummaryWindow::htmlSummary() } QList bests = context->athlete->rideCache->getBests(bestsColumn[i], 10, specification, useMetricUnits); + // show tsb when recorded + PMCData *pmcData = context->athlete->getPMCFor("coggan_tss"); + int pos=1; foreach(AthleteBest best, bests) { @@ -729,10 +732,11 @@ RideSummaryWindow::htmlSummary() } summary += " >"; - summary += QString("%1.%2%3") + summary += QString("%1.%2%3(%4)") .arg(pos++) .arg(best.value) - .arg(best.date.toString(tr("d MMM yyyy"))); + .arg(best.date.toString(tr("d MMM yyyy"))) + .arg((int)pmcData->sb(best.date)); } // close that column