# HG changeset patch # User glx # Date 1147971102 0 # Node ID 5e7218e1f9d09b2e3ec4a33d6d4b88e5c2967cfb # Parent 830819e9032f4d36344f433e16beac8619f2fb8f (svn r4906) - Fix: Refresh build vehicle window (if opened) when converting rail depot diff --git a/rail_cmd.c b/rail_cmd.c --- 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;