diff options
author | bjarni <bjarni@openttd.org> | 2006-10-10 08:14:30 +0000 |
---|---|---|
committer | bjarni <bjarni@openttd.org> | 2006-10-10 08:14:30 +0000 |
commit | 3dfe48b1892dc160efc1d1d0f6a6efdf732021ea (patch) | |
tree | 64aaeebbbaf19230f218f88798dbb3ec0de726b7 /train_gui.c | |
parent | 583fce3fa91d4bdf2a3a943b88d11c667e8c4857 (diff) | |
download | openttd-3dfe48b1892dc160efc1d1d0f6a6efdf732021ea.tar.xz |
(svn r6714) -Codechange: replaced a direct manipulation of windows with InvalidateWindowData() in rail_cmd.c
Moved the actual modification of railtype to WE_INVALIDATE_DATA in the train depot handler
-Codechange: added SetWindowDirty() to WE_INVALIDATE_DATA as it made no sense to update the list without making the window dirty
Diffstat (limited to 'train_gui.c')
-rw-r--r-- | train_gui.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/train_gui.c b/train_gui.c index 9e948fb9e..cd9eff36f 100644 --- a/train_gui.c +++ b/train_gui.c @@ -546,7 +546,9 @@ static void NewRailVehicleWndProc(Window *w, WindowEvent *e) break; case WE_INVALIDATE_DATA: + if (w->window_number != 0) WP(w,buildvehicle_d).railtype = GetRailType(w->window_number); WP(w,buildvehicle_d).data_invalidated = true; + SetWindowDirty(w); break; case WE_DESTROY: |