summaryrefslogtreecommitdiff
path: root/src/group_gui.cpp
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2012-04-17 19:44:12 +0000
committermichi_cc <michi_cc@openttd.org>2012-04-17 19:44:12 +0000
commit0daf3509227d476d7c869ce5c74906d7e3214565 (patch)
treea6eb39dadefba7ee49023b66f6667038a3660b1a /src/group_gui.cpp
parente44a923a71ad25f1a2d913d8bf858820e5ee7300 (diff)
downloadopenttd-0daf3509227d476d7c869ce5c74906d7e3214565.tar.xz
(svn r24138) -Feature(ette): Ctrl+drag to add all vehicles with a shared order list to a group. (Juanjo)
Diffstat (limited to 'src/group_gui.cpp')
-rw-r--r--src/group_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/group_gui.cpp b/src/group_gui.cpp
index 7b2c5c516..0c7a412c7 100644
--- a/src/group_gui.cpp
+++ b/src/group_gui.cpp
@@ -631,7 +631,7 @@ public:
switch (widget) {
case WID_GL_ALL_VEHICLES: // All vehicles
case WID_GL_DEFAULT_VEHICLES: // Ungrouped vehicles
- DoCommandP(0, DEFAULT_GROUP, this->vehicle_sel, CMD_ADD_VEHICLE_GROUP | CMD_MSG(STR_ERROR_GROUP_CAN_T_ADD_VEHICLE));
+ DoCommandP(0, DEFAULT_GROUP, this->vehicle_sel | (_ctrl_pressed ? 1 << 31 : 0), CMD_ADD_VEHICLE_GROUP | CMD_MSG(STR_ERROR_GROUP_CAN_T_ADD_VEHICLE));
this->vehicle_sel = INVALID_VEHICLE;
this->group_over = INVALID_GROUP;
@@ -648,7 +648,7 @@ public:
uint id_g = this->group_sb->GetScrolledRowFromWidget(pt.y, this, WID_GL_LIST_GROUP, 0, this->tiny_step_height);
if (id_g >= this->groups.Length()) return;
- DoCommandP(0, this->groups[id_g]->index, vindex, CMD_ADD_VEHICLE_GROUP | CMD_MSG(STR_ERROR_GROUP_CAN_T_ADD_VEHICLE));
+ DoCommandP(0, this->groups[id_g]->index, vindex | (_ctrl_pressed ? 1 << 31 : 0), CMD_ADD_VEHICLE_GROUP | CMD_MSG(STR_ERROR_GROUP_CAN_T_ADD_VEHICLE));
break;
}