Fix Veloclinic Model Variant Selection

.. it was broken in the PDModel refactor.

.. you can now select variants for the aerobic
   (slowtwtich) component.
This commit is contained in:
Mark Liversedge
2014-05-23 21:11:09 +01:00
parent a73eb1a962
commit c3ca1d6d72
2 changed files with 10 additions and 2 deletions

View File

@@ -307,6 +307,7 @@ CPPlot::plotModel()
break;
case 4 : // multimodel
pdModel = new MultiModel(context);
pdModel->setVariant(modelVariant);
break;
}
@@ -519,6 +520,7 @@ CPPlot::plotModel(QVector<double> vector, QColor plotColor, PDModel *baseline)
break;
case 4 : // multimodel
pdmodel = new MultiModel(context);
pdmodel->setVariant(modelVariant);
break;
}
@@ -1602,6 +1604,7 @@ CPPlot::calculateForDateRanges(QList<CompareDateRange> compareDateRanges)
break;
case 4 : // multimodel
baselineModel = new MultiModel(context);
baselineModel->setVariant(modelVariant);
break;
}
@@ -1671,13 +1674,14 @@ CPPlot::calculateForDateRanges(QList<CompareDateRange> compareDateRanges)
}
}
if (rideSeries == RideFile::watts) {
if (!showDelta && rideSeries == RideFile::watts) {
// set ymax to nearest 100 if power
int max = ymax * 1.1f;
max = ((max/100) + 1) * 100;
setAxisScale(yLeft, ymin, max);
setAxisScale(yLeft, 0, max);
} else {
// or just add 10% headroom