diff options
author | bjarni <bjarni@openttd.org> | 2006-10-07 14:30:13 +0000 |
---|---|---|
committer | bjarni <bjarni@openttd.org> | 2006-10-07 14:30:13 +0000 |
commit | bc1070654a4187273e38fcce5361e5606f33b1d9 (patch) | |
tree | ff7fa2247d12cb30d71d1ac2a8941d2af01165f8 /window.c | |
parent | e1ad1102f2692ff4d03986f25f6880b69b6b82ec (diff) | |
download | openttd-bc1070654a4187273e38fcce5361e5606f33b1d9.tar.xz |
(svn r6680) -Codechange r6679: [train build window] only generate the list when the window data is invalidated or the window is generated, not on each redraw
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -1609,12 +1609,26 @@ void InvalidateWindowClasses(WindowClass cls) } } +void InvalidateThisWindowData(Window *w) +{ + CallWindowEventNP(w, WE_INVALIDATE_DATA); +} + void InvalidateWindowData(WindowClass cls, WindowNumber number) { Window *w; for (w = _windows; w != _last_window; w++) { - if (w->window_class == cls && w->window_number == number) CallWindowEventNP(w, WE_INVALIDATE_DATA); + if (w->window_class == cls && w->window_number == number) InvalidateThisWindowData(w); + } +} + +void InvalidateWindowClassesData(WindowClass cls) +{ + Window *w; + + for (w = _windows; w != _last_window; w++) { + if (w->window_class == cls) InvalidateThisWindowData(w); } } |