mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-12 18:40:29 +00:00
(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
This commit is contained in:
parent
169c2ce619
commit
e5f1161edd
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user