(svn r7308) -Codechange: call GenerateBuildList() only when needed instead of on each redraw (peter1138)

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
KUDr 18 years ago
parent 952cb2ee5c
commit 81ba2ad919

@ -335,8 +335,6 @@ static void DrawBuildAircraftWindow(Window *w)
SetWindowWidgetDisabledState(w, BUILD_VEHICLE_WIDGET_BUILD, w->window_number == 0);
GenerateBuildList(w);
if (bv->sel_engine != INVALID_ENGINE) {
int i;
bool found = false;
@ -429,6 +427,7 @@ static void NewAircraftWndProc(Window *w, WindowEvent *e)
switch (e->event) {
case WE_INVALIDATE_DATA:
GenerateBuildList(w);
SetWindowDirty(w);
break;

Loading…
Cancel
Save