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

pull/155/head
glx 18 years ago
parent fa39815308
commit d2c8412e50

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

Loading…
Cancel
Save