From 01566d681603ddc3dfa98d49975fbe71395d3210 Mon Sep 17 00:00:00 2001 From: michi_cc Date: Thu, 20 Dec 2012 19:44:06 +0000 Subject: (svn r24834) -Fix [FS#5396]: The autorefit dropdown in the order GUI wasn't always updated when modifying vehicle consists. --- src/order_gui.cpp | 4 ++++ src/train_cmd.cpp | 1 + 2 files changed, 5 insertions(+) diff --git a/src/order_gui.cpp b/src/order_gui.cpp index 52f5c8c16..965ba4838 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -869,6 +869,10 @@ public: case VIWD_AUTOREPLACE: /* Autoreplace replaced the vehicle */ this->vehicle = Vehicle::Get(this->window_number); + /* FALL THROUGH */ + + case VIWD_CONSIST_CHANGED: + /* Vehicle composition was changed. */ this->UpdateAutoRefitState(); break; diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 032ed2bdb..7cbf4c19b 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -242,6 +242,7 @@ void Train::ConsistChanged(bool same_length) this->UpdateAcceleration(); SetWindowDirty(WC_VEHICLE_DETAILS, this->index); InvalidateWindowData(WC_VEHICLE_REFIT, this->index, VIWD_CONSIST_CHANGED); + InvalidateWindowData(WC_VEHICLE_ORDERS, this->index, VIWD_CONSIST_CHANGED); } } -- cgit v1.2.3-70-g09d2