Codechange: ToWindowNumber describes better what is the intent than Pack

This commit is contained in:
Rubidium
2025-02-01 21:15:26 +01:00
committed by rubidium42
parent 6b7cb4ede3
commit 5a78bb8fac
13 changed files with 31 additions and 30 deletions

View File

@@ -299,7 +299,7 @@ struct DepotWindow : Window {
void Close([[maybe_unused]] int data = 0) override
{
CloseWindowById(WC_BUILD_VEHICLE, this->window_number);
CloseWindowById(GetWindowClassForVehicleType(this->type), VehicleListIdentifier(VL_DEPOT_LIST, this->type, this->owner, this->GetDepotIndex()).Pack(), false);
CloseWindowById(GetWindowClassForVehicleType(this->type), VehicleListIdentifier(VL_DEPOT_LIST, this->type, this->owner, this->GetDepotIndex()).ToWindowNumber(), false);
OrderBackup::Reset(TileIndex(this->window_number));
this->Window::Close();
}