From bbfc4a768c82d1984e319c88920187d21f299b41 Mon Sep 17 00:00:00 2001 From: Sean Rhea Date: Sun, 13 Dec 2009 18:06:05 -0500 Subject: [PATCH] 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. --- src/AllPlot.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/AllPlot.cpp b/src/AllPlot.cpp index ced6cb82d..ee6d02756 100644 --- a/src/AllPlot.cpp +++ b/src/AllPlot.cpp @@ -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;