summaryrefslogtreecommitdiff
path: root/src/vehicle_cmd.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-10-01 19:38:57 +0000
committerfrosch <frosch@openttd.org>2012-10-01 19:38:57 +0000
commit6018a0190e1e10a199f311ec399c0c816f9e4913 (patch)
treed7f3acee9144ab4a42a814178403c21342f9aeaa /src/vehicle_cmd.cpp
parentadf1929f0a01e2ddf55029c565bd8ef0e3959f73 (diff)
downloadopenttd-6018a0190e1e10a199f311ec399c0c816f9e4913.tar.xz
(svn r24567) -Fix [FS#5261]: Non-train vehicle lists were not resorted when vehicles were renamed. (Juanjo)
Diffstat (limited to 'src/vehicle_cmd.cpp')
-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();
}