Mercurial > hg > openttd
changeset 1842:3dbf00d8681a draft
(svn r2347) - Fix (regression): depot window did not get redrawn when a non-train-engine was sold.
author | Darkvater <Darkvater@openttd.org> |
---|---|
date | Tue, 17 May 2005 23:08:21 +0000 |
parents | 002ec056cc99 |
children | 1101a11da7e7 |
files | train_cmd.c |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/train_cmd.c +++ b/train_cmd.c @@ -932,9 +932,11 @@ // make sure the vehicle is stopped in the depot if (CheckTrainStoppedInDepot(first) < 0) return CMD_ERROR; - if ((flags & DC_EXEC) && v == first && first->subtype == TS_Front_Engine) { - DeleteWindowById(WC_VEHICLE_VIEW, first->index); - InvalidateWindow(WC_REPLACE_VEHICLE, VEH_Train); + if (flags & DC_EXEC) { + if (v == first && first->subtype == TS_Front_Engine) { + DeleteWindowById(WC_VEHICLE_VIEW, first->index); + InvalidateWindow(WC_REPLACE_VEHICLE, VEH_Train); + } InvalidateWindow(WC_VEHICLE_DEPOT, first->tile); RebuildVehicleLists(); }