mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
W'bal and Derived refresh
.. during mass update, not just on data change.
This commit is contained in:
@@ -121,6 +121,7 @@ class RideFile : public QObject // QObject to emit signals
|
||||
|
||||
friend class RideFileCommand; // tells us we were modified
|
||||
friend class RideCache; // tells us if wbal is stale
|
||||
friend class RideItem; // derived/wbal stale
|
||||
friend class MainWindow; // tells us we were modified
|
||||
friend class Context; // tells us we were saved
|
||||
|
||||
|
||||
@@ -204,11 +204,15 @@ RideItem::notifyRideDataChanged()
|
||||
isstale=true;
|
||||
|
||||
// force a recompute of derived data series
|
||||
if (ride_) ride_->recalculateDerivedSeries(true);
|
||||
if (ride_) {
|
||||
ride_->wstale = true;
|
||||
ride_->recalculateDerivedSeries(true);
|
||||
}
|
||||
|
||||
// refresh the cache
|
||||
if (fileCache_) fileCache_->refresh(ride());
|
||||
|
||||
|
||||
// refresh the data
|
||||
refresh();
|
||||
|
||||
@@ -448,6 +452,11 @@ RideItem::refresh()
|
||||
// close if we opened it
|
||||
if (doclose) {
|
||||
close();
|
||||
} else {
|
||||
|
||||
// if it is open then recompute
|
||||
ride_->wstale = true;
|
||||
ride_->recalculateDerivedSeries(true);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user