mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 16:39:57 +00:00
RideFile reading refactoring
With the introduction of the rideSelected signal the RideFile was opened (as previously) by the RideSummaryWindow::htmlSummary() member. In some cases, this signal was processed by RideSummary window AFTER the other charts (AllPlot etc) this results in 'No data' being shown on other charts. This patch moves the file reading to RideItem::ride() which was previously a public RideFile * (that is now a protected member ride_). As a happy by product it removes the need to check if the file has already been read across all other functions ensuring in-core values are not accidentally overwritten. The read errors are made available by a new RideItem::errors() member. This modification is required to support the RideImportWizard in freeing loaded RideFiles during batch import to ensure virtual memory is not exhausted when large numbers of files are imported at once. This modification is also included in this patch.
This commit is contained in:
committed by
Sean Rhea
parent
71d67e2203
commit
feb111a4ff
@@ -200,7 +200,7 @@ WeeklySummaryWindow::refresh()
|
||||
) {
|
||||
|
||||
item->computeMetrics(); // generates item->ride
|
||||
if (!item->ride)
|
||||
if (!item->ride())
|
||||
continue;
|
||||
|
||||
RideMetric *m;
|
||||
|
||||
Reference in New Issue
Block a user