summaryrefslogtreecommitdiff
path: root/src/depot_gui.cpp
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2021-02-21 16:46:02 +0000
committerCharles Pigott <charlespigott@googlemail.com>2021-02-21 17:58:19 +0000
commit3af407340e53703d2ccf558112eb67438096add7 (patch)
tree517c2f86320d4989e09b57e26d368e548f563b72 /src/depot_gui.cpp
parent88959f55958070dd4cfa57ab0c6ce01a55792748 (diff)
downloadopenttd-3af407340e53703d2ccf558112eb67438096add7.tar.xz
Fix #8349: Close depot vehicle list windows when closing the depot window
Diffstat (limited to 'src/depot_gui.cpp')
-rw-r--r--src/depot_gui.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp
index 9571fbea1..4bc676268 100644
--- a/src/depot_gui.cpp
+++ b/src/depot_gui.cpp
@@ -294,6 +294,7 @@ struct DepotWindow : Window {
~DepotWindow()
{
DeleteWindowById(WC_BUILD_VEHICLE, this->window_number);
+ DeleteWindowById(GetWindowClassForVehicleType(this->type), VehicleListIdentifier(VL_DEPOT_LIST, this->type, this->owner, GetDepotIndex(this->window_number)).Pack(), false);
OrderBackup::Reset(this->window_number);
}