summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
authorPeterN <peter@fuzzle.org>2019-02-10 08:43:54 +0000
committerGitHub <noreply@github.com>2019-02-10 08:43:54 +0000
commitd242875d270e29f198cc62508b338f8949bf3404 (patch)
tree331272647b78fb37fddcf50d437c419d7f7422a2 /src/vehicle.cpp
parent6e211908588ab5272336d0d2db3bbb4020f7004f (diff)
downloadopenttd-d242875d270e29f198cc62508b338f8949bf3404.tar.xz
Fix #7197: Invalidate depot buttons when necessary. (#7212)
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r--src/vehicle.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index f655bbafc..f9a48a898 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -1490,6 +1490,8 @@ void VehicleEnterDepot(Vehicle *v)
TriggerVehicle(v, VEHICLE_TRIGGER_DEPOT);
v->MarkDirty();
+ InvalidateWindowData(WC_VEHICLE_VIEW, v->index);
+
if (v->current_order.IsType(OT_GOTO_DEPOT)) {
SetWindowDirty(WC_VEHICLE_VIEW, v->index);