mirror of https://github.com/OpenTTD/OpenTTD
(svn r5225) Some windows periodically check if their parent exists - if not they close themselves
This is unnecessary, because their parents already close them when they get closed Therefore remove the code for the periodic checksrelease/0.5
parent
0f5453d95b
commit
88f9473c85
|
@ -179,12 +179,6 @@ static void NewAircraftWndProc(Window *w, WindowEvent *e)
|
|||
}
|
||||
break;
|
||||
|
||||
case WE_4:
|
||||
if (w->window_number != 0 && !FindWindowById(WC_VEHICLE_DEPOT, w->window_number)) {
|
||||
DeleteWindow(w);
|
||||
}
|
||||
break;
|
||||
|
||||
case WE_ON_EDIT_TEXT: {
|
||||
if (e->edittext.str[0] != '\0') {
|
||||
_cmd_text = e->edittext.str;
|
||||
|
@ -432,11 +426,6 @@ do_change_service_int:
|
|||
}
|
||||
} break;
|
||||
|
||||
case WE_4:
|
||||
if (FindWindowById(WC_VEHICLE_VIEW, w->window_number) == NULL)
|
||||
DeleteWindow(w);
|
||||
break;
|
||||
|
||||
case WE_ON_EDIT_TEXT:
|
||||
if (e->edittext.str[0] != '\0') {
|
||||
_cmd_text = e->edittext.str;
|
||||
|
|
|
@ -487,11 +487,6 @@ static void OrdersWndProc(Window *w, WindowEvent *e)
|
|||
}
|
||||
} break;
|
||||
|
||||
case WE_4: {
|
||||
if (FindWindowById(WC_VEHICLE_VIEW, w->window_number) == NULL)
|
||||
DeleteWindow(w);
|
||||
} break;
|
||||
|
||||
case WE_PLACE_OBJ: {
|
||||
OrdersPlaceObj(GetVehicle(w->window_number), e->place.tile, w);
|
||||
} break;
|
||||
|
|
|
@ -256,11 +256,6 @@ do_change_service_int:
|
|||
}
|
||||
} break;
|
||||
|
||||
case WE_4:
|
||||
if (FindWindowById(WC_VEHICLE_VIEW, w->window_number) == NULL)
|
||||
DeleteWindow(w);
|
||||
break;
|
||||
|
||||
case WE_ON_EDIT_TEXT: {
|
||||
if (e->edittext.str[0] != '\0') {
|
||||
_cmd_text = e->edittext.str;
|
||||
|
@ -561,12 +556,6 @@ static void NewRoadVehWndProc(Window *w, WindowEvent *e)
|
|||
}
|
||||
break;
|
||||
|
||||
case WE_4:
|
||||
if (w->window_number != 0 && !FindWindowById(WC_VEHICLE_DEPOT, w->window_number)) {
|
||||
DeleteWindow(w);
|
||||
}
|
||||
break;
|
||||
|
||||
case WE_ON_EDIT_TEXT:
|
||||
if (e->edittext.str[0] != '\0') {
|
||||
_cmd_text = e->edittext.str;
|
||||
|
|
11
ship_gui.c
11
ship_gui.c
|
@ -251,11 +251,6 @@ do_change_service_int:
|
|||
}
|
||||
} break;
|
||||
|
||||
case WE_4:
|
||||
if (FindWindowById(WC_VEHICLE_VIEW, w->window_number) == NULL)
|
||||
DeleteWindow(w);
|
||||
break;
|
||||
|
||||
case WE_ON_EDIT_TEXT:
|
||||
if (e->edittext.str[0] != '\0') {
|
||||
_cmd_text = e->edittext.str;
|
||||
|
@ -394,12 +389,6 @@ static void NewShipWndProc(Window *w, WindowEvent *e)
|
|||
}
|
||||
break;
|
||||
|
||||
case WE_4:
|
||||
if (w->window_number != 0 && !FindWindowById(WC_VEHICLE_DEPOT, w->window_number)) {
|
||||
DeleteWindow(w);
|
||||
}
|
||||
break;
|
||||
|
||||
case WE_ON_EDIT_TEXT:
|
||||
if (e->edittext.str[0] != '\0') {
|
||||
_cmd_text = e->edittext.str;
|
||||
|
|
11
train_gui.c
11
train_gui.c
|
@ -284,12 +284,6 @@ static void NewRailVehicleWndProc(Window *w, WindowEvent *e)
|
|||
}
|
||||
} break;
|
||||
|
||||
case WE_4:
|
||||
if (w->window_number != 0 && !FindWindowById(WC_VEHICLE_DEPOT, w->window_number)) {
|
||||
DeleteWindow(w);
|
||||
}
|
||||
break;
|
||||
|
||||
case WE_ON_EDIT_TEXT: {
|
||||
if (e->edittext.str[0] != '\0') {
|
||||
_cmd_text = e->edittext.str;
|
||||
|
@ -1292,11 +1286,6 @@ do_change_service_int:
|
|||
}
|
||||
} break;
|
||||
|
||||
case WE_4:
|
||||
if (FindWindowById(WC_VEHICLE_VIEW, w->window_number) == NULL)
|
||||
DeleteWindow(w);
|
||||
break;
|
||||
|
||||
case WE_ON_EDIT_TEXT:
|
||||
if (e->edittext.str[0] != '\0') {
|
||||
_cmd_text = e->edittext.str;
|
||||
|
|
Loading…
Reference in New Issue