1
0
Fork 0

Fix 0829604b4f: Dragging of selected order was still not possible. (#14259)

Check click_count condition earlier so that drag and drop is activated.
pull/14235/head
Peter Nelson 2025-05-13 01:22:58 +01:00 committed by GitHub
parent 431e57d087
commit bc778545b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -1228,8 +1228,8 @@ public:
if (sel == INVALID_VEH_ORDER_ID || this->vehicle->owner != _local_company) { if (sel == INVALID_VEH_ORDER_ID || this->vehicle->owner != _local_company) {
/* Deselect clicked order */ /* Deselect clicked order */
this->selected_order = -1; this->selected_order = -1;
} else if (sel == this->selected_order) { } else if (sel == this->selected_order && click_count > 1) {
if (click_count > 1 && this->vehicle->type == VEH_TRAIN && sel < this->vehicle->GetNumOrders()) { if (this->vehicle->type == VEH_TRAIN && sel < this->vehicle->GetNumOrders()) {
Command<CMD_MODIFY_ORDER>::Post(STR_ERROR_CAN_T_MODIFY_THIS_ORDER, Command<CMD_MODIFY_ORDER>::Post(STR_ERROR_CAN_T_MODIFY_THIS_ORDER,
this->vehicle->tile, this->vehicle->index, sel, this->vehicle->tile, this->vehicle->index, sel,
MOF_STOP_LOCATION, (this->vehicle->GetOrder(sel)->GetStopLocation() + 1) % OSL_END); MOF_STOP_LOCATION, (this->vehicle->GetOrder(sel)->GetStopLocation() + 1) % OSL_END);