* Handle the click on the delete button. */
| 701 | * Handle the click on the delete button. |
| 702 | */ |
| 703 | void OrderClick_Delete() |
| 704 | { |
| 705 | /* When networking, move one order lower */ |
| 706 | int selected = this->selected_order + (int)_networking; |
| 707 | |
| 708 | if (Command<CMD_DELETE_ORDER>::Post(STR_ERROR_CAN_T_DELETE_THIS_ORDER, this->vehicle->tile, this->vehicle->index, this->OrderGetSel())) { |
| 709 | this->selected_order = selected >= this->vehicle->GetNumOrders() ? -1 : selected; |
| 710 | this->UpdateButtonState(); |
| 711 | } |
| 712 | } |
| 713 | |
| 714 | /** |
| 715 | * Handle the click on the 'stop sharing' button. |
no test coverage detected