mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-16 09:29:55 +00:00
MainWindow Refactor Part 3 of 5
Slowly migrating code and data from the MainWindow class to Athlete and Context classes. This update moves the ride and interval lists and data structures from MainWindow to Athlete.
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "AddIntervalDialog.h"
|
||||
#include "MainWindow.h"
|
||||
#include "Athlete.h"
|
||||
#include "Context.h"
|
||||
#include "IntervalItem.h"
|
||||
#include "RideFile.h"
|
||||
@@ -645,7 +646,7 @@ AddIntervalDialog::addClicked()
|
||||
QString name = resultsTable->item(i,2)->text();
|
||||
const RideFile *ride = context->currentRide();
|
||||
|
||||
QTreeWidgetItem *allIntervals = context->mainWindow->mutableIntervalItems();
|
||||
QTreeWidgetItem *allIntervals = context->athlete->mutableIntervalItems();
|
||||
QTreeWidgetItem *last =
|
||||
new IntervalItem(ride, name, start, stop,
|
||||
ride->timeToDistance(start),
|
||||
@@ -656,5 +657,5 @@ AddIntervalDialog::addClicked()
|
||||
allIntervals->addChild(last);
|
||||
}
|
||||
}
|
||||
context->mainWindow->updateRideFileIntervals();
|
||||
context->athlete->updateRideFileIntervals();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user