mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 16:39:57 +00:00
Add RideFileCache to RideItem
.. so available for current ride .. and refreshed() when notifyDataChanged() is called .. but not many classes call it! .. we are moving to having the filecache read from the RideCache rather than straight from disk so we have an in-memory and persisted version.
This commit is contained in:
@@ -722,6 +722,19 @@ RideFileCache::refreshCache()
|
||||
}
|
||||
}
|
||||
|
||||
// if you already have a cache open and want
|
||||
// to refresh it from in-memory data then refresh()
|
||||
// does that
|
||||
void RideFileCache::refresh(RideFile *file)
|
||||
{
|
||||
// set and refresh
|
||||
if (file == NULL && ride == NULL) return;
|
||||
if (file) ride = file;
|
||||
|
||||
// just call compute!
|
||||
compute();
|
||||
}
|
||||
|
||||
// this function is a candidate for supporting
|
||||
// threaded calculations, each of the computes
|
||||
// in here could go in its own thread. Users
|
||||
|
||||
Reference in New Issue
Block a user