mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Return cached value
This commit is contained in:
@@ -667,8 +667,10 @@ RideFile::getWeight()
|
||||
QList<SummaryMetrics> measures = mainwindow->metricDB->getAllMeasuresFor(QDateTime::fromString("Jan 1 00:00:00 1900"), startTime());
|
||||
int i = measures.count()-1;
|
||||
if (i) {
|
||||
while (i>=0 && weight_ == 0) {
|
||||
weight_ = measures[i].getText("Weight", "0.0").toDouble();
|
||||
while (i>=0) {
|
||||
if ((weight_ = measures[i].getText("Weight", "0.0").toDouble()) > 0) {
|
||||
return weight_;
|
||||
}
|
||||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user