Rename close window functions to match upstream

This commit is contained in:
Jonathan G Rennison
2023-09-15 20:59:08 +01:00
parent ed1b842ad3
commit a18f3274b4
75 changed files with 291 additions and 299 deletions

View File

@@ -451,7 +451,7 @@ struct TimetableWindow : GeneralVehicleWindow {
/* Removed / replaced all orders (after deleting / sharing) */
if (this->sel_index == -1) break;
this->DeleteChildWindows();
this->CloseChildWindows();
this->sel_index = -1;
break;
@@ -490,7 +490,7 @@ struct TimetableWindow : GeneralVehicleWindow {
/* Now we are modifying the selected order */
if (to == INVALID_VEH_ORDER_ID) {
/* Deleting selected order */
this->DeleteChildWindows();
this->CloseChildWindows();
this->sel_index = -1;
break;
} else {
@@ -878,7 +878,7 @@ struct TimetableWindow : GeneralVehicleWindow {
const Vehicle *v = this->vehicle;
this->clicked_widget = widget;
this->DeleteChildWindows(WC_QUERY_STRING);
this->CloseChildWindows(WC_QUERY_STRING);
switch (widget) {
case WID_VT_ORDER_VIEW: // Order view button
@@ -900,7 +900,7 @@ struct TimetableWindow : GeneralVehicleWindow {
this->sel_index = (selected == INVALID_ORDER || selected == this->sel_index) ? -1 : selected;
}
this->DeleteChildWindows();
this->CloseChildWindows();
break;
}
@@ -1248,8 +1248,8 @@ static WindowDesc _timetable_desc(
*/
void ShowTimetableWindow(const Vehicle *v)
{
DeleteWindowById(WC_VEHICLE_DETAILS, v->index, false);
DeleteWindowById(WC_VEHICLE_ORDERS, v->index, false);
CloseWindowById(WC_VEHICLE_DETAILS, v->index, false);
CloseWindowById(WC_VEHICLE_ORDERS, v->index, false);
AllocateWindowDescFront<TimetableWindow>(&_timetable_desc, v->index);
}