diff options
author | glx <glx@openttd.org> | 2006-05-18 16:51:42 +0000 |
---|---|---|
committer | glx <glx@openttd.org> | 2006-05-18 16:51:42 +0000 |
commit | 62dbc3674138aeaa2da4883e4e45cc77222da794 (patch) | |
tree | 189029cd6bfbb19c65e12e355e4e3853253407b8 | |
parent | 136359ecbd81926d3d18868477782ce1d8c1fa50 (diff) | |
download | openttd-62dbc3674138aeaa2da4883e4e45cc77222da794.tar.xz |
(svn r4906) - Fix: Refresh build vehicle window (if opened) when converting rail depot
-rw-r--r-- | rail_cmd.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/rail_cmd.c b/rail_cmd.c index 89a03d047..55ea56cfe 100644 --- a/rail_cmd.c +++ b/rail_cmd.c @@ -861,6 +861,15 @@ static int32 DoConvertRail(TileIndex tile, RailType totype, bool exec) 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; |