Remove modified behaviour of depot button when ctrl not pressed and go to depot and sell enabled
See: #470
This commit is contained in:
@@ -3894,8 +3894,7 @@ public:
|
|||||||
this->depot_select_ctrl_pressed = _ctrl_pressed;
|
this->depot_select_ctrl_pressed = _ctrl_pressed;
|
||||||
this->depot_select_active = true;
|
this->depot_select_active = true;
|
||||||
}
|
}
|
||||||
} else if (_settings_client.gui.show_depot_sell_gui && v->current_order.IsType(OT_GOTO_DEPOT)) {
|
} else if (_ctrl_pressed && _settings_client.gui.show_depot_sell_gui && v->current_order.IsType(OT_GOTO_DEPOT)) {
|
||||||
if (_ctrl_pressed) {
|
|
||||||
OrderDepotActionFlags flags = v->current_order.GetDepotActionType() & (ODATFB_HALT | ODATFB_SELL);
|
OrderDepotActionFlags flags = v->current_order.GetDepotActionType() & (ODATFB_HALT | ODATFB_SELL);
|
||||||
DropDownList list;
|
DropDownList list;
|
||||||
list.emplace_back(new DropDownListStringItem(STR_VEHICLE_LIST_SEND_FOR_SERVICING, DEPOT_SERVICE | DEPOT_DONT_CANCEL, !flags));
|
list.emplace_back(new DropDownListStringItem(STR_VEHICLE_LIST_SEND_FOR_SERVICING, DEPOT_SERVICE | DEPOT_DONT_CANCEL, !flags));
|
||||||
@@ -3903,9 +3902,6 @@ public:
|
|||||||
list.emplace_back(new DropDownListStringItem(BaseVehicleListWindow::vehicle_depot_sell_name[v->type], DEPOT_SELL | DEPOT_DONT_CANCEL, flags == (ODATFB_HALT | ODATFB_SELL)));
|
list.emplace_back(new DropDownListStringItem(BaseVehicleListWindow::vehicle_depot_sell_name[v->type], DEPOT_SELL | DEPOT_DONT_CANCEL, flags == (ODATFB_HALT | ODATFB_SELL)));
|
||||||
list.emplace_back(new DropDownListStringItem(STR_VEHICLE_LIST_CANCEL_DEPOT_SERVICE, DEPOT_CANCEL, false));
|
list.emplace_back(new DropDownListStringItem(STR_VEHICLE_LIST_CANCEL_DEPOT_SERVICE, DEPOT_CANCEL, false));
|
||||||
ShowDropDownList(this, std::move(list), -1, widget, 0, true);
|
ShowDropDownList(this, std::move(list), -1, widget, 0, true);
|
||||||
} else {
|
|
||||||
DoCommandP(v->tile, v->index | DEPOT_CANCEL, 0, GetCmdSendToDepot(v));
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
this->HandleButtonClick(WID_VV_GOTO_DEPOT);
|
this->HandleButtonClick(WID_VV_GOTO_DEPOT);
|
||||||
DoCommandP(v->tile, v->index | (_ctrl_pressed ? DEPOT_SERVICE : 0U), 0, GetCmdSendToDepot(v));
|
DoCommandP(v->tile, v->index | (_ctrl_pressed ? DEPOT_SERVICE : 0U), 0, GetCmdSendToDepot(v));
|
||||||
|
Reference in New Issue
Block a user