mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Season Config - don't delete!
The seasons class emits signals to let everyone know if the season config changes at runtime. The recent patch to add configuration of seasons deleted and re-instantiated the seasons member in MainWindow which breaks updating across the code. This patch fixes that.
This commit is contained in:
@@ -3867,9 +3867,6 @@ SeasonsPage::saveClicked()
|
||||
QString file = QString(mainWindow->home.absolutePath() + "/seasons.xml");
|
||||
SeasonParser::serialize(file, array);
|
||||
|
||||
// wipe existing mainwindow config
|
||||
delete mainWindow->seasons;
|
||||
|
||||
// re-read
|
||||
mainWindow->seasons = new Seasons(mainWindow->home);
|
||||
mainWindow->seasons->readSeasons();
|
||||
}
|
||||
|
||||
@@ -248,6 +248,8 @@ Seasons::readSeasons()
|
||||
season.setStart(today.addMonths(-12));
|
||||
season.setId(QUuid("{00000000-0000-0000-0000-000000000010}"));
|
||||
seasons.append(season);
|
||||
|
||||
seasonsChanged(); // signal!
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
Reference in New Issue
Block a user