From 7817d59989e1ccb6774fb238eee7537a4866d10d Mon Sep 17 00:00:00 2001 From: Khopa Date: Thu, 27 Aug 2020 23:47:00 +0200 Subject: [PATCH] Fixed campaign sometimes not starting when the user does not explicitly re-select a campaign and just kee p the default one.. --- qt_ui/windows/newgame/QNewGameWizard.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qt_ui/windows/newgame/QNewGameWizard.py b/qt_ui/windows/newgame/QNewGameWizard.py index cb88fc21..3daace57 100644 --- a/qt_ui/windows/newgame/QNewGameWizard.py +++ b/qt_ui/windows/newgame/QNewGameWizard.py @@ -12,7 +12,7 @@ import qt_ui.uiconstants as CONST from game import db, Game from game.settings import Settings from gen import namegen -from qt_ui.windows.newgame.QCampaignList import QCampaignList +from qt_ui.windows.newgame.QCampaignList import QCampaignList, CAMPAIGNS from theater import start_generator, persiangulf, nevada, caucasus, ConflictTheater, normandy, thechannel @@ -42,6 +42,8 @@ class NewGameWizard(QtWidgets.QWizard): redFaction = [c for c in db.FACTIONS][self.field("redFaction")] selectedCampaign = self.field("selectedCampaign") + if selectedCampaign is None: + selectedCampaign = CAMPAIGNS[0] conflictTheater = selectedCampaign[1]() timePeriod = db.TIME_PERIODS[list(db.TIME_PERIODS.keys())[self.field("timePeriod")]]