File diff r17475:4f9f7a996b1b → r17476:d3b7a183536d
src/fios_gui.cpp
Show inline comments
 
@@ -650,26 +650,32 @@ public:
 
			FiosMakeSavegameName(_file_to_saveload.name, this->text.buf, sizeof(_file_to_saveload.name));
 

	
 
			/* In the editor set up the vehicle engines correctly (date might have changed) */
 
			if (_game_mode == GM_EDITOR) StartupEngines();
 
		}
 
	}
 

	
 
	virtual void OnResize()
 
	{
 
		this->vscroll->SetCapacityFromWidget(this, SLWW_DRIVES_DIRECTORIES_LIST);
 
	}
 

	
 
	virtual void OnInvalidateData(int data)
 
	/**
 
	 * Some data on this window has become invalid.
 
	 * @param data Information about the changed data.
 
	 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
 
	 */
 
	virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
 
	{
 
		if (!gui_scope) return;
 
		switch (data) {
 
			case 0:
 
				/* Rescan files */
 
				this->selected = NULL;
 
				_load_check_data.Clear();
 
				BuildFileList();
 
				/* FALL THROUGH */
 
			case 1:
 
				/* Selection changes */
 
				if (_saveload_mode == SLD_LOAD_GAME || _saveload_mode == SLD_LOAD_SCENARIO) {
 
					this->SetWidgetDisabledState(SLWW_LOAD_BUTTON,
 
							this->selected == NULL || _load_check_data.HasErrors() || !(_load_check_data.grf_compatibility != GLC_NOT_FOUND || _settings_client.gui.UserIsAllowedToChangeNewGRFs()));