Remove Zones from RideItem

.. they are in Athlete::zones() et al now

.. this refactor was missed in the 3.0 mainwindow
   refactoring and is part of the prep to use RideItem
   as an in memory cache instead of the old metricDB
This commit is contained in:
Mark Liversedge
2014-12-03 19:06:07 +00:00
parent ee02071461
commit aea550c267
14 changed files with 102 additions and 127 deletions

View File

@@ -106,9 +106,14 @@ GoogleMapControl::rideSelected()
// Route metadata ...
setSubTitle(ride->ride()->getTag("Route", tr("Route")));
range =ride->zoneRange();
if(range < 0) rideCP = 300; // default cp to 300 watts
else rideCP = ride->zones->getCP(range);
// default to ..
range = -1;
rideCP = 300;
if (context->athlete->zones()) {
range = context->athlete->zones()->whichRange(ride->dateTime.date());
if (range >= 0) rideCP = context->athlete->zones()->getCP(range);
}
loadRide();
}