summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vehicle_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp
index bfcdb6862..f0a0428dd 100644
--- a/src/vehicle_cmd.cpp
+++ b/src/vehicle_cmd.cpp
@@ -1017,7 +1017,7 @@ CommandCost CmdRenameVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
if (flags & DC_EXEC) {
free(v->name);
v->name = reset ? NULL : strdup(text);
- InvalidateWindowClassesData(WC_TRAINS_LIST, 1);
+ InvalidateWindowClassesData(GetWindowClassForVehicleType(v->type), 1);
MarkWholeScreenDirty();
}