(svn r7308) -Codechange: call GenerateBuildList() only when needed instead of on each redraw (peter1138)
authorKUDr
Thu, 30 Nov 2006 21:33:09 +0000
changeset 5194 f471a618864f
parent 5193 f77b7d387910
child 5195 fa04ba5d3465
(svn r7308) -Codechange: call GenerateBuildList() only when needed instead of on each redraw (peter1138)
build_vehicle_gui.c
--- a/build_vehicle_gui.c	Thu Nov 30 19:37:16 2006 +0000
+++ b/build_vehicle_gui.c	Thu Nov 30 21:33:09 2006 +0000
@@ -335,8 +335,6 @@
 
 	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 @@
 
 	switch (e->event) {
 		case WE_INVALIDATE_DATA:
+			GenerateBuildList(w);
 			SetWindowDirty(w);
 			break;