summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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);
}
}