# HG changeset patch # User tron # Date 1150037781 0 # Node ID 62bea6a7f948f564a3f528c33e9715f893e2f7e7 # Parent 59533bcf68ec7c5a339ce8cc3c23e41951884a79 (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 diff -r 59533bcf68ec -r 62bea6a7f948 aircraft_gui.c --- a/aircraft_gui.c Sun Jun 11 07:17:43 2006 +0000 +++ b/aircraft_gui.c Sun Jun 11 14:56:21 2006 +0000 @@ -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; diff -r 59533bcf68ec -r 62bea6a7f948 order_gui.c --- a/order_gui.c Sun Jun 11 07:17:43 2006 +0000 +++ b/order_gui.c Sun Jun 11 14:56:21 2006 +0000 @@ -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; diff -r 59533bcf68ec -r 62bea6a7f948 roadveh_gui.c --- a/roadveh_gui.c Sun Jun 11 07:17:43 2006 +0000 +++ b/roadveh_gui.c Sun Jun 11 14:56:21 2006 +0000 @@ -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; diff -r 59533bcf68ec -r 62bea6a7f948 ship_gui.c --- a/ship_gui.c Sun Jun 11 07:17:43 2006 +0000 +++ b/ship_gui.c Sun Jun 11 14:56:21 2006 +0000 @@ -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; diff -r 59533bcf68ec -r 62bea6a7f948 train_gui.c --- a/train_gui.c Sun Jun 11 07:17:43 2006 +0000 +++ b/train_gui.c Sun Jun 11 14:56:21 2006 +0000 @@ -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;