diff options
author | yexo <yexo@openttd.org> | 2010-10-28 18:15:42 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2010-10-28 18:15:42 +0000 |
commit | e5f1161eddc899f409cf4d9a4b3df770a9cc57c2 (patch) | |
tree | b4de45f127e8af239e5d46ea0c6d39bd69638cbb | |
parent | 169c2ce6194d3ed1a586848839cfd7aa5b6c322b (diff) | |
download | openttd-e5f1161eddc899f409cf4d9a4b3df770a9cc57c2.tar.xz |
(svn r21054) -Fix [FS#4188] (r19397): scenario starting year was not set correctly when changed by clicking on the date panel and entering a new value
-rw-r--r-- | src/toolbar_gui.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index 6b2d0876f..6047c6c42 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -811,7 +811,7 @@ static void ToolbarSwitchClick(Window *w) */ static void ToolbarScenDatePanel(Window *w) { - SetDParam(0, _settings_newgame.game_creation.starting_year); + SetDParam(0, _settings_game.game_creation.starting_year); ShowQueryString(STR_JUST_INT, STR_MAPGEN_START_DATE_QUERY_CAPT, 8, 100, w, CS_NUMERAL, QSF_ENABLE_DEFAULT); _left_button_clicked = false; } @@ -1694,6 +1694,7 @@ public: value = DEF_START_YEAR; } _settings_game.game_creation.starting_year = Clamp(value, MIN_YEAR, MAX_YEAR); + SetDate(ConvertYMDToDate(_settings_game.game_creation.starting_year, 0, 1), 0); this->SetDirty(); } |