Use TLW parent for wxMessageDialog in all ports.

This avoids problems with deleting child windows which are parents of
wxMessageDialog before the dialog itself is destroyed and was already done in
wxGTK, but not in wxMSW nor wxOSX. Do it in all ports now by calling
GetParentForModalDialog() from wxMessageDialogBase ctor itself instead of
depending on the port-specific wxMessageDialog to do it.

Closes #16631.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2014-10-19 12:56:37 +00:00
parent a776eb65d0
commit 3b1de0dc8b
2 changed files with 2 additions and 2 deletions

View File

@ -92,7 +92,7 @@ public:
: m_message(message),
m_caption(caption)
{
m_parent = parent;
m_parent = GetParentForModalDialog(parent, style);
SetMessageDialogStyle(style);
}

View File

@ -48,7 +48,7 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent,
const wxPoint& WXUNUSED(pos))
: wxMessageDialogBase
(
GetParentForModalDialog(parent, style),
parent,
message,
caption,
style