summaryrefslogtreecommitdiff
path: root/src/order_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-08-06 19:00:31 +0000
committerfrosch <frosch@openttd.org>2008-08-06 19:00:31 +0000
commit3064767d6984dc6ef0d40af372518f4733e276c4 (patch)
treedbd56e98703bc1b336e6410be4808f033c42e362 /src/order_gui.cpp
parent84cbf2c755e6e4b45b4c1659bcbdc463a717e4da (diff)
downloadopenttd-3064767d6984dc6ef0d40af372518f4733e276c4.tar.xz
(svn r14007) -Fix [FS#2098]: Notify vehicle windows when their internal state is botched up from outside.
Diffstat (limited to 'src/order_gui.cpp')
-rw-r--r--src/order_gui.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/order_gui.cpp b/src/order_gui.cpp
index 6316073c7..765efa1e7 100644
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -619,6 +619,12 @@ public:
this->FindWindowPlacementAndResize(desc);
}
+ virtual void OnInvalidateData(int data = 0)
+ {
+ /* Autoreplace replaced the vehicle */
+ this->vehicle = GetVehicle(this->window_number);
+ }
+
virtual void OnPaint()
{
bool shared_orders = this->vehicle->IsOrderListShared();