(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

This commit is contained in:
bjarni
2006-10-07 14:30:13 +00:00
parent e1ad1102f2
commit bc1070654a
5 changed files with 33 additions and 4 deletions

View File

@@ -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);
}
}