1
0
Fork 0

(svn r4906) - Fix: Refresh build vehicle window (if opened) when converting rail depot

release/0.5
glx 2006-05-18 16:51:42 +00:00
parent 136359ecbd
commit 62dbc36741
1 changed files with 9 additions and 0 deletions

View File

@ -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;