Changeset - r19298:9d81b51d8e91
[Not reviewed]
master
0 1 0
frosch - 12 years ago 2012-05-05 19:26:11
frosch@openttd.org
(svn r24201) -Fix [FS#5170]: Mark group list dirty when setting/clearing autoreplace for an engine type.
1 file changed with 4 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/autoreplace_cmd.cpp
Show inline comments
 
@@ -769,7 +769,10 @@ CommandCost CmdSetAutoReplace(TileIndex 
 
		cost = RemoveEngineReplacementForCompany(c, old_engine_type, id_g, flags);
 
	}
 

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

	
 
	return cost;
0 comments (0 inline, 0 general)