(svn r23422) -Fix [FS#4863] (r22797): the default palette setting wasn't applied correctly anymore as the configuration file is loaded after the first NewGRF scan

This commit is contained in:
rubidium 2011-12-04 11:18:43 +00:00
parent 87fdac852c
commit 5891099f24
3 changed files with 4 additions and 1 deletions

View File

@ -240,5 +240,6 @@ GRFTextWrapper *FindUnknownGRFName(uint32 grfid, uint8 *md5sum, bool create);
#endif /* ENABLE_NETWORK */
void UpdateNewGRFScanStatus(uint num, const char *name);
bool UpdateNewGRFConfigPalette(int32 p1 = 0);
#endif /* NEWGRF_CONFIG_H */

View File

@ -398,6 +398,9 @@ struct AfterNewGRFScan : NewGRFScanCallback {
uint last_newgrf_count = _settings_client.gui.last_newgrf_count;
LoadFromConfig();
_settings_client.gui.last_newgrf_count = last_newgrf_count;
/* Since the default for the palette might have changed due to
* reading the configuration file, recalculate that now. */
UpdateNewGRFConfigPalette();
AI::Uninitialize(true);
CheckConfig();

View File

@ -40,7 +40,6 @@ static bool InvalidateIndustryViewWindow(int32 p1);
static bool InvalidateAISettingsWindow(int32 p1);
static bool RedrawTownAuthority(int32 p1);
static bool InvalidateCompanyInfrastructureWindow(int32 p1);
extern bool UpdateNewGRFConfigPalette(int32 p1);
static bool ZoomMinMaxChanged(int32 p1);
#ifdef ENABLE_NETWORK