don't show axes for non-existent curves

If you don't have altitude, you'll no longer have an axis for feet/meters.
Thanks to Gary Smith for pointing out that the previous behavior was silly.
This commit is contained in:
Sean Rhea
2009-12-13 18:06:05 -05:00
parent 542e4d6a4d
commit bbfc4a768c

View File

@@ -546,6 +546,12 @@ AllPlot::setData(RideItem *_rideItem)
if (!cadArray.empty()) cadCurve->attach(this);
if (!altArray.empty()) altCurve->attach(this);
wattsCurve->setVisible(dataPresent->watts);
hrCurve->setVisible(dataPresent->hr);
speedCurve->setVisible(dataPresent->kph);
cadCurve->setVisible(dataPresent->cad);
altCurve->setVisible(dataPresent->alt);
arrayLength = 0;
foreach (const RideFilePoint *point, ride->dataPoints()) {
timeArray[arrayLength] = point->secs;