mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
(svn r2347) - Fix (regression): depot window did not get redrawn when a non-train-engine was sold.
This commit is contained in:
parent
70e2e79c45
commit
9fb4b2ef55
@ -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
|
// make sure the vehicle is stopped in the depot
|
||||||
if (CheckTrainStoppedInDepot(first) < 0) return CMD_ERROR;
|
if (CheckTrainStoppedInDepot(first) < 0) return CMD_ERROR;
|
||||||
|
|
||||||
if ((flags & DC_EXEC) && v == first && first->subtype == TS_Front_Engine) {
|
if (flags & DC_EXEC) {
|
||||||
|
if (v == first && first->subtype == TS_Front_Engine) {
|
||||||
DeleteWindowById(WC_VEHICLE_VIEW, first->index);
|
DeleteWindowById(WC_VEHICLE_VIEW, first->index);
|
||||||
InvalidateWindow(WC_REPLACE_VEHICLE, VEH_Train);
|
InvalidateWindow(WC_REPLACE_VEHICLE, VEH_Train);
|
||||||
|
}
|
||||||
InvalidateWindow(WC_VEHICLE_DEPOT, first->tile);
|
InvalidateWindow(WC_VEHICLE_DEPOT, first->tile);
|
||||||
RebuildVehicleLists();
|
RebuildVehicleLists();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user