From 73ea0646ae9b20c7fe751a62ed3fb18eabe3a792 Mon Sep 17 00:00:00 2001 From: Darkvater Date: Tue, 17 May 2005 23:08:21 +0000 Subject: (svn r2347) - Fix (regression): depot window did not get redrawn when a non-train-engine was sold. --- train_cmd.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'train_cmd.c') diff --git a/train_cmd.c b/train_cmd.c index 95770e442..4539e83f2 100644 --- a/train_cmd.c +++ b/train_cmd.c @@ -932,9 +932,11 @@ int32 CmdSellRailWagon(int x, int y, uint32 flags, uint32 p1, uint32 p2) // 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(); } -- cgit v1.2.3-54-g00ecf