From 059190f32f27d29ad3beea0d638b1457e775899a Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Sat, 14 Jan 2012 17:41:42 +0000 Subject: [PATCH] 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. --- src/Pages.cpp | 5 +---- src/Season.cpp | 2 ++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Pages.cpp b/src/Pages.cpp index 8e19e414f..4b93bca2e 100644 --- a/src/Pages.cpp +++ b/src/Pages.cpp @@ -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(); } diff --git a/src/Season.cpp b/src/Season.cpp index 1257c96f8..d79e64233 100644 --- a/src/Season.cpp +++ b/src/Season.cpp @@ -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