Mercurial > hg > openttd
changeset 4012:a56a6dd1f22e draft
(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 checks
author | tron <tron@openttd.org> |
---|---|
date | Sun, 11 Jun 2006 14:56:21 +0000 |
parents | 3087808b106a |
children | 48e404094c00 |
files | aircraft_gui.c order_gui.c roadveh_gui.c ship_gui.c train_gui.c |
diffstat | 5 files changed, 0 insertions(+), 49 deletions(-) [+] |
line wrap: on
line diff
--- a/aircraft_gui.c +++ b/aircraft_gui.c @@ -179,12 +179,6 @@ } 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 @@ } } 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;
--- a/order_gui.c +++ b/order_gui.c @@ -487,11 +487,6 @@ } } 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;
--- a/roadveh_gui.c +++ b/roadveh_gui.c @@ -256,11 +256,6 @@ } } 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 @@ } 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;
--- a/ship_gui.c +++ b/ship_gui.c @@ -251,11 +251,6 @@ } } 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 @@ } 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;
--- a/train_gui.c +++ b/train_gui.c @@ -284,12 +284,6 @@ } } 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 @@ } } 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;