Mercurial > hg > openttd
changeset 3869:5e7218e1f9d0 draft
(svn r4906) - Fix: Refresh build vehicle window (if opened) when converting rail depot
author | glx <glx@openttd.org> |
---|---|
date | Thu, 18 May 2006 16:51:42 +0000 |
parents | 830819e9032f |
children | 7c05b375d151 |
files | rail_cmd.c |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/rail_cmd.c +++ b/rail_cmd.c @@ -861,6 +861,15 @@ if (exec) { SetRailType(tile, totype); MarkTileDirtyByTile(tile); + + /* Update build vehicle window related to this depot */ + if (IsTileDepotType(tile, TRANSPORT_RAIL)) { + Window *w = FindWindowById(WC_BUILD_VEHICLE, tile); + if (w != NULL) { + WP(w,buildtrain_d).railtype = totype; + SetWindowDirty(w); + } + } } return _price.build_rail / 2;