diff options
author | planetmaker <planetmaker@openttd.org> | 2010-11-07 21:46:41 +0000 |
---|---|---|
committer | planetmaker <planetmaker@openttd.org> | 2010-11-07 21:46:41 +0000 |
commit | 5565ae1ac0d41c95812fe1a1713188a200d75876 (patch) | |
tree | 8940467fc369492be882448b48326c7764bb1bbe /src/settings.cpp | |
parent | b9ccf6dcccd6336dd24e6ed5d4cd02d93526c7c8 (diff) | |
download | openttd-5565ae1ac0d41c95812fe1a1713188a200d75876.tar.xz |
(svn r21116) -Add [FS#3012]: Reduce the chances to accidentially break savegames with NewGRFs
Diffstat (limited to 'src/settings.cpp')
-rw-r--r-- | src/settings.cpp | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index f4a166da5..7354534b4 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -702,18 +702,6 @@ static bool RedrawScreen(int32 p1) } /** - * Reinitalise all windows, i.e. construct their windows - * from the begin. For example to show a particular button - * that was previously hidden. - * @param p1 ignored - */ -static bool ReinitWindows(int32 p1) -{ - ReInitAllWindows(); - return true; -} - -/** * Redraw the smallmap after a colour scheme change. * @param p1 Callback parameter. * @return Always true. @@ -890,6 +878,21 @@ static bool InvalidateVehTimetableWindow(int32 p1) return true; } +/** + * Update any possible saveload window and delete any newgrf dialogue as + * its widget parts might change. Reinit all windows as it allows access to the + * newgrf debug button. + * @param p1 unused. + * @return Always true. + */ +static bool InvalidateNewGRFChangeWindows(int32 p1) +{ + InvalidateWindowClassesData(WC_SAVELOAD); + DeleteWindowByClass(WC_GAME_OPTIONS); + ReInitAllWindows(); + return true; +} + static bool InvalidateCompanyLiveryWindow(int32 p1) { InvalidateWindowClassesData(WC_COMPANY_COLOUR); |