X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..bd235295fb3b35fdb29326084b87893cf5432eb5:/src/univ/dialog.cpp diff --git a/src/univ/dialog.cpp b/src/univ/dialog.cpp index f0f3d659c2..c0f69439b7 100644 --- a/src/univ/dialog.cpp +++ b/src/univ/dialog.cpp @@ -179,13 +179,10 @@ int wxDialog::ShowModal() // use the apps top level window as parent if none given unless explicitly // forbidden - if ( !GetParent() && !(GetWindowStyleFlag() & wxDIALOG_NO_PARENT) ) + wxWindow * const parent = GetParentForModalDialog(); + if ( parent && parent != this ) { - wxWindow * const parent = GetParentForModalDialog(); - if ( parent && parent != this ) - { - m_parent = parent; - } + m_parent = parent; } Show(true);