From 5ab10031bc8b4c39c1c491cd29b5162c1ac7eef1 Mon Sep 17 00:00:00 2001 From: KUDr Date: Thu, 30 Nov 2006 21:33:09 +0000 Subject: [PATCH] (svn r7308) -Codechange: call GenerateBuildList() only when needed instead of on each redraw (peter1138) --- build_vehicle_gui.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build_vehicle_gui.c b/build_vehicle_gui.c index 4d7f7542a0..b1c82c95f4 100644 --- a/build_vehicle_gui.c +++ b/build_vehicle_gui.c @@ -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;