mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(svn r7308) -Codechange: call GenerateBuildList() only when needed instead of on each redraw (peter1138)
This commit is contained in:
parent
4f8f438ea4
commit
5ab10031bc
@ -335,8 +335,6 @@ static void DrawBuildAircraftWindow(Window *w)
|
|||||||
|
|
||||||
SetWindowWidgetDisabledState(w, BUILD_VEHICLE_WIDGET_BUILD, w->window_number == 0);
|
SetWindowWidgetDisabledState(w, BUILD_VEHICLE_WIDGET_BUILD, w->window_number == 0);
|
||||||
|
|
||||||
GenerateBuildList(w);
|
|
||||||
|
|
||||||
if (bv->sel_engine != INVALID_ENGINE) {
|
if (bv->sel_engine != INVALID_ENGINE) {
|
||||||
int i;
|
int i;
|
||||||
bool found = false;
|
bool found = false;
|
||||||
@ -429,6 +427,7 @@ static void NewAircraftWndProc(Window *w, WindowEvent *e)
|
|||||||
|
|
||||||
switch (e->event) {
|
switch (e->event) {
|
||||||
case WE_INVALIDATE_DATA:
|
case WE_INVALIDATE_DATA:
|
||||||
|
GenerateBuildList(w);
|
||||||
SetWindowDirty(w);
|
SetWindowDirty(w);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user