W'bal and Derived refresh

.. during mass update, not just on data change.
This commit is contained in:
Mark Liversedge
2015-01-01 11:28:01 +00:00
parent 6c5f726bf5
commit 0a5cb2b4a3
2 changed files with 11 additions and 1 deletions

View File

@@ -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

View File

@@ -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 {