Fix exit on last TLW logic after the change of r75633.
The changes in this revision meant to prevent the closure of transient dialogs from quitting the application (see #15880) prevented any application using AUI, including the aui sample, from exiting as the AUI utility frames deleted during the main frame destruction were returning false from their IsLastBeforeExit() now. Fix this by relaxing the check and ignoring the parent if it is already being deleted anyhow -- in this case there is no danger of closing it accidentally. Closes #15894. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -151,8 +151,9 @@ bool wxTopLevelWindowBase::IsLastBeforeExit() const
|
||||
// second, never terminate the application after closing a child TLW
|
||||
// because this would close its parent unexpectedly -- notice that this
|
||||
// check is not redundant with the loop below, as the parent might return
|
||||
// false from its ShouldPreventAppExit()
|
||||
if ( GetParent() )
|
||||
// false from its ShouldPreventAppExit() -- except if the child is being
|
||||
// deleted as part of the parent destruction
|
||||
if ( GetParent() && !GetParent()->IsBeingDeleted() )
|
||||
return false;
|
||||
|
||||
wxWindowList::const_iterator i;
|
||||
|
Reference in New Issue
Block a user