Changeset - r19983:2df3f9831582
[Not reviewed]
master
0 2 0
peter1138 - 11 years ago 2013-01-23 20:00:00
peter1138@openttd.org
(svn r24939) -Fix: Redraw autoreplace window properly in network games.
2 files changed with 1 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/autoreplace_cmd.cpp
Show inline comments
 
@@ -766,7 +766,7 @@ CommandCost CmdSetAutoReplace(TileIndex 
 

	
 
	if (flags & DC_EXEC) {
 
		GroupStatistics::UpdateAutoreplace(_current_company);
 
		SetWindowClassesDirty(GetWindowClassForVehicleType(Engine::Get(old_engine_type)->type));
 
		if (IsLocalCompany()) SetWindowDirty(WC_REPLACE_VEHICLE, Engine::Get(old_engine_type)->type);
 
	}
 
	if ((flags & DC_EXEC) && IsLocalCompany()) InvalidateAutoreplaceWindow(old_engine_type, id_g);
 

	
src/autoreplace_gui.cpp
Show inline comments
 
@@ -186,7 +186,6 @@ class ReplaceVehicleWindow : public Wind
 
		EngineID veh_from = this->sel_engine[0];
 
		EngineID veh_to = this->sel_engine[1];
 
		DoCommandP(0, (replace_when_old ? 1 : 0) | (this->sel_group << 16), veh_from + (veh_to << 16), CMD_SET_AUTOREPLACE);
 
		this->SetDirty();
 
	}
 

	
 
public:
 
@@ -455,7 +454,6 @@ public:
 
			case WID_RV_STOP_REPLACE: { // Stop replacing
 
				EngineID veh_from = this->sel_engine[0];
 
				DoCommandP(0, this->sel_group << 16, veh_from + (INVALID_ENGINE << 16), CMD_SET_AUTOREPLACE);
 
				this->SetDirty();
 
				break;
 
			}
 

	
0 comments (0 inline, 0 general)