summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2012-12-20 19:44:06 +0000
committermichi_cc <michi_cc@openttd.org>2012-12-20 19:44:06 +0000
commit01566d681603ddc3dfa98d49975fbe71395d3210 (patch)
tree2414568b0019e5fcc03575908a73372e26fe933d /src
parentc75962e04c0999c0c458b2ee54519f094d7c6543 (diff)
downloadopenttd-01566d681603ddc3dfa98d49975fbe71395d3210.tar.xz
(svn r24834) -Fix [FS#5396]: The autorefit dropdown in the order GUI wasn't always updated when modifying vehicle consists.
Diffstat (limited to 'src')
-rw-r--r--src/order_gui.cpp4
-rw-r--r--src/train_cmd.cpp1
2 files changed, 5 insertions, 0 deletions
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);
}
}