diff options
author | frosch <frosch@openttd.org> | 2011-03-13 21:33:02 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2011-03-13 21:33:02 +0000 |
commit | f051a81b4e5064f6b5c1d00f4a7d0ae38f768e35 (patch) | |
tree | d46d4b664842c0baa010d593bb864e1e9eca1702 /src/timetable_gui.cpp | |
parent | 0ff4f31723c22a53dec3c44de64b0385355e972d (diff) | |
download | openttd-f051a81b4e5064f6b5c1d00f4a7d0ae38f768e35.tar.xz |
(svn r22244) -Codechange: Make vehicle windows handle command-/GUI-scope invalidations themself (from autoreplace and refitting).
Diffstat (limited to 'src/timetable_gui.cpp')
-rw-r--r-- | src/timetable_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp index 51cd82982..791e3312e 100644 --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -250,12 +250,10 @@ struct TimetableWindow : Window { */ virtual void OnInvalidateData(int data = 0, bool gui_scope = true) { - if (!gui_scope) return; switch (data) { case -666: /* Autoreplace replaced the vehicle */ this->vehicle = Vehicle::Get(this->window_number); - /* This case is _not_ called asynchronously. Get out directly, rest can be done later */ break; case -1: @@ -267,11 +265,13 @@ struct TimetableWindow : Window { break; case -2: + if (!gui_scope) break; this->UpdateSelectionStates(); this->ReInit(); break; default: { + if (!gui_scope) break; /* Moving an order. If one of these is INVALID_VEH_ORDER_ID, then * the order is being created / removed */ if (this->sel_index == -1) break; |