mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Fix findBests when no speed/gps
.. flawed logic. Same fix also applied to master.
This commit is contained in:
@@ -520,7 +520,7 @@ AddIntervalDialog::findBests(bool typeTime, const RideFile *ride, double windowS
|
|||||||
|
|
||||||
// ride is shorter than the window size!
|
// ride is shorter than the window size!
|
||||||
if (typeTime && windowSize > ride->dataPoints().last()->secs + secsDelta) return;
|
if (typeTime && windowSize > ride->dataPoints().last()->secs + secsDelta) return;
|
||||||
else if (windowSize > ride->dataPoints().last()->km*1000) return;
|
if (!typeTime && windowSize > ride->dataPoints().last()->km*1000) return;
|
||||||
|
|
||||||
// We're looking for intervals with durations in [windowSizeSecs, windowSizeSecs + secsDelta).
|
// We're looking for intervals with durations in [windowSizeSecs, windowSizeSecs + secsDelta).
|
||||||
foreach (const RideFilePoint *point, ride->dataPoints()) {
|
foreach (const RideFilePoint *point, ride->dataPoints()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user