From bc778545b333ac044e7ec3df013403cfcba922b8 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Tue, 13 May 2025 01:22:58 +0100 Subject: [PATCH] Fix 0829604b4f: Dragging of selected order was still not possible. (#14259) Check click_count condition earlier so that drag and drop is activated. --- src/order_gui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/order_gui.cpp b/src/order_gui.cpp index 80bb8474ea..f4e3f25b26 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -1228,8 +1228,8 @@ public: if (sel == INVALID_VEH_ORDER_ID || this->vehicle->owner != _local_company) { /* Deselect clicked order */ this->selected_order = -1; - } else if (sel == this->selected_order) { - if (click_count > 1 && this->vehicle->type == VEH_TRAIN && sel < this->vehicle->GetNumOrders()) { + } else if (sel == this->selected_order && click_count > 1) { + if (this->vehicle->type == VEH_TRAIN && sel < this->vehicle->GetNumOrders()) { Command::Post(STR_ERROR_CAN_T_MODIFY_THIS_ORDER, this->vehicle->tile, this->vehicle->index, sel, MOF_STOP_LOCATION, (this->vehicle->GetOrder(sel)->GetStopLocation() + 1) % OSL_END);