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:
committed by
Vadim Zeitlin
parent
3e3d2ff096
commit
50435ef678
@@ -346,7 +346,7 @@ bool wxAnyChoiceDialog::Create(wxWindow *parent,
|
|||||||
const long styleBtns = styleDlg & (wxOK | wxCANCEL);
|
const long styleBtns = styleDlg & (wxOK | wxCANCEL);
|
||||||
styleDlg &= ~styleBtns;
|
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;
|
return false;
|
||||||
|
|
||||||
wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
|
wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
Reference in New Issue
Block a user