summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorstormcone <48624099+stormcone@users.noreply.github.com>2019-05-10 19:19:07 +0200
committerNiels Martin Hansen <nielsm@indvikleren.dk>2019-05-10 19:49:51 +0200
commit24c59283ecc334615bf68bf4d8a2fb258339a278 (patch)
tree41c3fc82815323b04bb61c5a37e54c82f6f40844 /src
parent7a0e2923e50cfe1318b8db580b75e639a1a60f68 (diff)
downloadopenttd-24c59283ecc334615bf68bf4d8a2fb258339a278.tar.xz
Fix #7224: Drag and drop vehicle group creation does not work correctly.
When drag and drop a vehicle into an empty slot in the vehicle group window it tries to create the new group as the subgroup of the first group (GroupID = 0). This is failing if the dragged vehicle's type is different than the first group's vehicle type.
Diffstat (limited to 'src')
-rw-r--r--src/group_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/group_cmd.cpp b/src/group_cmd.cpp
index 9915546eb..a9451ee8f 100644
--- a/src/group_cmd.cpp
+++ b/src/group_cmd.cpp
@@ -537,7 +537,7 @@ CommandCost CmdAddVehicleGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, u
if (new_g == NEW_GROUP) {
/* Create new group. */
- CommandCost ret = CmdCreateGroup(0, flags, v->type, 0, nullptr);
+ CommandCost ret = CmdCreateGroup(0, flags, v->type, INVALID_GROUP, nullptr);
if (ret.Failed()) return ret;
new_g = _new_group_id;