Change window close/deallocation to match upstream

This commit is contained in:
Jonathan G Rennison
2023-09-15 23:56:33 +01:00
parent 79cfc3e8bd
commit f5d1b1d8f8
50 changed files with 352 additions and 341 deletions

View File

@@ -210,11 +210,12 @@ struct SchdispatchWindow : GeneralVehicleWindow {
this->AutoSelectSchedule();
}
~SchdispatchWindow()
void Close() override
{
if (!FocusWindowById(WC_VEHICLE_VIEW, this->window_number)) {
MarkDirtyFocusedRoutePaths(this->vehicle);
}
this->GeneralVehicleWindow::Close();
}
uint base_width;
@@ -1169,7 +1170,7 @@ struct ScheduledDispatchAddSlotsWindow : Window {
case WID_SCHDISPATCH_ADD_SLOT_ADD_BUTTON:
static_cast<SchdispatchWindow *>(this->parent)->AddMultipleDepartureSlots(this->start, this->step, this->end);
delete this;
this->Close();
break;
}
}