mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Estimator lazy refresh
.. Refresh model estimates when rides added, deleted, saved. .. Lazy refresh will cancel any pending or running threads and trigger a new one in 15 secs time. .. This strategy allows us to call a lazy refresh even when importing large number of rides, since the start will be delayed and cancelled by the next ride added etc. .. The thread stop() function is also called by the destructor to stop when the user exits and avoiding delay/SEGV on exit.
This commit is contained in:
@@ -287,6 +287,9 @@ RideCache::addRide(QString name, bool dosignal, bool select, bool useTempActivit
|
||||
// notify everyone to select the one we were already on
|
||||
context->notifyRideSelected(prior);
|
||||
}
|
||||
|
||||
// model estimates (lazy refresh)
|
||||
estimator->refresh();
|
||||
}
|
||||
|
||||
void
|
||||
@@ -376,6 +379,9 @@ RideCache::removeCurrentRide()
|
||||
|
||||
// now select another ride
|
||||
context->notifyRideSelected(select);
|
||||
|
||||
// model estimates (lazy refresh)
|
||||
estimator->refresh();
|
||||
}
|
||||
|
||||
// NOTE:
|
||||
|
||||
Reference in New Issue
Block a user