Fix parent/child relationship in MSW wxFindReplaceDialog
It's not enough to set the parent pointer in the child, the parent also needs to be aware of its child, so call AddChild() to do both at once. This ensures that find dialog with non-null parent is destroyed by it when it is itself destroyed. Closes #18747.
This commit is contained in:
parent
35f1cb417b
commit
05bf67df1e
@ -347,7 +347,9 @@ bool wxFindReplaceDialog::Create(wxWindow *parent,
|
||||
{
|
||||
m_windowStyle = flags;
|
||||
m_FindReplaceData = data;
|
||||
m_parent = parent;
|
||||
|
||||
if ( parent )
|
||||
parent->AddChild(this);
|
||||
|
||||
SetTitle(title);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user