mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Stress Calculator loses pending changes
The stress calculator works through every ride and updates stress.cache. After each file is processed its details are wiped with a freeMemory, this causes unsaved changes to be lost (isDirty is ignored). This patch adds a check to make sure the file is not dirty before the in-core values are deleted.
This commit is contained in:
committed by
Sean Rhea
parent
937907c6b8
commit
30341cf339
@@ -158,7 +158,8 @@ void StressCalculator::calculateStress(QWidget *mw,
|
||||
cache[ridedatestring][bs_name] = bs;
|
||||
cache[ridedatestring][dp_name] = dp;
|
||||
|
||||
item->freeMemory();
|
||||
// only delete if the ride is clean (i.e. no pending ave)
|
||||
if (item->isDirty() == false) item->freeMemory();
|
||||
}
|
||||
|
||||
addRideData(metric == bs_name ? bs : dp,item->dateTime);
|
||||
|
||||
Reference in New Issue
Block a user