mirror of https://github.com/OpenTTD/OpenTTD
(svn r13099) -Fix [FS#2014]: when a window had children only one of them would be closed (on a parent closure) instead of all children.
parent
15e89b32b9
commit
009a748ab3
|
@ -626,8 +626,12 @@ Window::~Window()
|
||||||
memmove(wz, wz + 1, (byte*)_last_z_window - (byte*)wz);
|
memmove(wz, wz + 1, (byte*)_last_z_window - (byte*)wz);
|
||||||
_last_z_window--;
|
_last_z_window--;
|
||||||
|
|
||||||
/* Delete any children a window might have in a head-recursive manner */
|
/* Delete all children a window might have in a head-recursive manner */
|
||||||
delete FindChildWindow(this);
|
Window *child = FindChildWindow(this);
|
||||||
|
while (child != NULL) {
|
||||||
|
delete child;
|
||||||
|
child = FindChildWindow(this);
|
||||||
|
}
|
||||||
|
|
||||||
WindowEvent e;
|
WindowEvent e;
|
||||||
e.event = WE_DESTROY;
|
e.event = WE_DESTROY;
|
||||||
|
|
Loading…
Reference in New Issue