diff options
author | frosch <frosch@openttd.org> | 2012-05-05 19:26:11 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-05-05 19:26:11 +0000 |
commit | a9165d3f32dac1d150904335a54217934efbb60f (patch) | |
tree | ada9126e97abcf4a1857eb9ae7fc9b5d91dc5813 /src | |
parent | fb63991851aa0e3043677827da56f720fd3c94f6 (diff) | |
download | openttd-a9165d3f32dac1d150904335a54217934efbb60f.tar.xz |
(svn r24201) -Fix [FS#5170]: Mark group list dirty when setting/clearing autoreplace for an engine type.
Diffstat (limited to 'src')
-rw-r--r-- | src/autoreplace_cmd.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp index d20882220..5ef230e64 100644 --- a/src/autoreplace_cmd.cpp +++ b/src/autoreplace_cmd.cpp @@ -769,7 +769,10 @@ CommandCost CmdSetAutoReplace(TileIndex tile, DoCommandFlag flags, uint32 p1, ui 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; |