Rename close window functions to match upstream
This commit is contained in:
@@ -432,7 +432,7 @@ static WindowDesc _cargo_type_unload_orders_widgets (
|
||||
void ShowCargoTypeOrdersWindow(const Vehicle *v, Window *parent, VehicleOrderID order_id, CargoTypeOrdersWindowVariant variant)
|
||||
{
|
||||
WindowDesc &desc = (variant == CTOWV_LOAD) ? _cargo_type_load_orders_widgets : _cargo_type_unload_orders_widgets;
|
||||
DeleteWindowById(desc.cls, v->index);
|
||||
CloseWindowById(desc.cls, v->index);
|
||||
CargoTypeOrdersWindow *w = new CargoTypeOrdersWindow(&desc, v, order_id, variant);
|
||||
w->parent = parent;
|
||||
}
|
||||
@@ -1902,8 +1902,8 @@ public:
|
||||
|
||||
~OrdersWindow()
|
||||
{
|
||||
DeleteWindowById(WC_VEHICLE_CARGO_TYPE_LOAD_ORDERS, this->window_number, false);
|
||||
DeleteWindowById(WC_VEHICLE_CARGO_TYPE_UNLOAD_ORDERS, this->window_number, false);
|
||||
CloseWindowById(WC_VEHICLE_CARGO_TYPE_LOAD_ORDERS, this->window_number, false);
|
||||
CloseWindowById(WC_VEHICLE_CARGO_TYPE_UNLOAD_ORDERS, this->window_number, false);
|
||||
if (!FocusWindowById(WC_VEHICLE_VIEW, this->window_number)) {
|
||||
MarkDirtyFocusedRoutePaths(this->vehicle);
|
||||
}
|
||||
@@ -1996,7 +1996,7 @@ public:
|
||||
/* Removed / replaced all orders (after deleting / sharing) */
|
||||
if (this->selected_order == -1) break;
|
||||
|
||||
this->DeleteChildWindows();
|
||||
this->CloseChildWindows();
|
||||
HideDropDownMenu(this);
|
||||
this->selected_order = -1;
|
||||
break;
|
||||
@@ -2026,7 +2026,7 @@ public:
|
||||
/* Now we are modifying the selected order */
|
||||
if (to == INVALID_VEH_ORDER_ID) {
|
||||
/* Deleting selected order */
|
||||
this->DeleteChildWindows();
|
||||
this->CloseChildWindows();
|
||||
HideDropDownMenu(this);
|
||||
this->selected_order = -1;
|
||||
break;
|
||||
@@ -2726,7 +2726,7 @@ public:
|
||||
}
|
||||
|
||||
/* This order won't be selected any more, close all child windows and dropdowns */
|
||||
this->DeleteChildWindows();
|
||||
this->CloseChildWindows();
|
||||
HideDropDownMenu(this);
|
||||
|
||||
if (sel == INVALID_VEH_ORDER_ID || this->vehicle->owner != _local_company) {
|
||||
@@ -3981,8 +3981,8 @@ static WindowDesc _other_orders_desc(
|
||||
|
||||
void ShowOrdersWindow(const Vehicle *v)
|
||||
{
|
||||
DeleteWindowById(WC_VEHICLE_DETAILS, v->index, false);
|
||||
DeleteWindowById(WC_VEHICLE_TIMETABLE, v->index, false);
|
||||
CloseWindowById(WC_VEHICLE_DETAILS, v->index, false);
|
||||
CloseWindowById(WC_VEHICLE_TIMETABLE, v->index, false);
|
||||
if (BringWindowToFrontById(WC_VEHICLE_ORDERS, v->index) != nullptr) return;
|
||||
|
||||
/* Using a different WindowDescs for _local_company causes problems.
|
||||
|
Reference in New Issue
Block a user