Use the appropriate parent for the choice dialogs

Fall back to the main application window if no parent was explicitly specified
using the standard GetParentForModalDialog() method.

See #17295
This commit is contained in:
Troels Knakkergaard
2015-12-22 18:29:59 +01:00
committed by Vadim Zeitlin
parent 3e3d2ff096
commit 50435ef678

View File

@@ -346,7 +346,7 @@ bool wxAnyChoiceDialog::Create(wxWindow *parent,
const long styleBtns = styleDlg & (wxOK | wxCANCEL);
styleDlg &= ~styleBtns;
if ( !wxDialog::Create(parent, wxID_ANY, caption, pos, wxDefaultSize, styleDlg) )
if ( !wxDialog::Create(GetParentForModalDialog(parent, styleDlg), wxID_ANY, caption, pos, wxDefaultSize, styleDlg) )
return false;
wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );