summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2014-06-08 15:49:54 +0000
committerfrosch <frosch@openttd.org>2014-06-08 15:49:54 +0000
commit7ab5a99e37fe4474374465058ca03f4785303a2b (patch)
treebae603fe389f2f8cc3e5f9aa6e320c6f94a871a4
parente9e812ccc88d0bb0bf754774726590a2a68b9adb (diff)
downloadopenttd-7ab5a99e37fe4474374465058ca03f4785303a2b.tar.xz
(svn r26634) -Fix: 'Load' button was not properly enabled/disabled for old savegames without NewGRF information.
-rw-r--r--src/fios_gui.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fios_gui.cpp b/src/fios_gui.cpp
index 5c91ec77d..14c335e94 100644
--- a/src/fios_gui.cpp
+++ b/src/fios_gui.cpp
@@ -535,7 +535,7 @@ public:
if (_saveload_mode == SLD_LOAD_HEIGHTMAP) {
delete this;
ShowHeightmapLoad();
- } else if (_load_check_data.grf_compatibility != GLC_NOT_FOUND || _settings_client.gui.UserIsAllowedToChangeNewGRFs()) {
+ } else if (!_load_check_data.HasNewGrfs() || _load_check_data.grf_compatibility != GLC_NOT_FOUND || _settings_client.gui.UserIsAllowedToChangeNewGRFs()) {
_switch_mode = (_game_mode == GM_EDITOR) ? SM_LOAD_SCENARIO : SM_LOAD_GAME;
ClearErrorMessages();
delete this;
@@ -552,7 +552,7 @@ public:
case WID_SL_MISSING_NEWGRFS:
if (!_network_available) {
ShowErrorMessage(STR_NETWORK_ERROR_NOTAVAILABLE, INVALID_STRING_ID, WL_ERROR);
- } else {
+ } else if (_load_check_data.HasNewGrfs()) {
#if defined(ENABLE_NETWORK)
ShowMissingContentWindow(_load_check_data.grfconfig);
#endif
@@ -693,7 +693,7 @@ public:
}
if (_saveload_mode == SLD_LOAD_GAME || _saveload_mode == SLD_LOAD_SCENARIO) {
this->SetWidgetDisabledState(WID_SL_LOAD_BUTTON,
- this->selected == NULL || _load_check_data.HasErrors() || !(_load_check_data.grf_compatibility != GLC_NOT_FOUND || _settings_client.gui.UserIsAllowedToChangeNewGRFs()));
+ this->selected == NULL || _load_check_data.HasErrors() || !(!_load_check_data.HasNewGrfs() || _load_check_data.grf_compatibility != GLC_NOT_FOUND || _settings_client.gui.UserIsAllowedToChangeNewGRFs()));
this->SetWidgetDisabledState(WID_SL_NEWGRF_INFO,
!_load_check_data.HasNewGrfs());
this->SetWidgetDisabledState(WID_SL_MISSING_NEWGRFS,