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:
parent
a776eb65d0
commit
3b1de0dc8b
@ -92,7 +92,7 @@ public:
|
||||
: m_message(message),
|
||||
m_caption(caption)
|
||||
{
|
||||
m_parent = parent;
|
||||
m_parent = GetParentForModalDialog(parent, style);
|
||||
SetMessageDialogStyle(style);
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent,
|
||||
const wxPoint& WXUNUSED(pos))
|
||||
: wxMessageDialogBase
|
||||
(
|
||||
GetParentForModalDialog(parent, style),
|
||||
parent,
|
||||
message,
|
||||
caption,
|
||||
style
|
||||
|
Loading…
Reference in New Issue
Block a user