Skip to content

Commit

Permalink
Fix OpenTTD#9702: Revert old behaviour in group GUI when not using sh…
Browse files Browse the repository at this point in the history
…ared orders
  • Loading branch information
btzy committed Nov 17, 2021
1 parent fc58ed9 commit fb36576
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/group_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -745,20 +745,24 @@ class VehicleGroupWindow : public BaseVehicleListWindow {
default:
NOT_REACHED();
}

if (v) {
if (_ctrl_pressed) {
if (this->grouping == GB_NONE) {
if (this->grouping == GB_NONE) {
this->vehicle_sel = v->index;

if (_ctrl_pressed) {
this->SelectGroup(v->group_id);
} else {
ShowOrdersWindow(v);
}
} else {
this->vehicle_sel = v->index;

SetObjectToPlaceWnd(SPR_CURSOR_MOUSE, PAL_NONE, HT_DRAG, this);
SetMouseCursorVehicle(v, EIT_IN_LIST);
_cursor.vehchain = true;

this->SetDirty();
}
else {
ShowOrdersWindow(v);
}
}

break;
Expand Down

0 comments on commit fb36576

Please sign in to comment.