From 50435ef67831dc3ab356864a88fb259d82ca7dc3 Mon Sep 17 00:00:00 2001 From: Troels Knakkergaard Date: Tue, 22 Dec 2015 18:29:59 +0100 Subject: [PATCH] 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 --- src/generic/choicdgg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generic/choicdgg.cpp b/src/generic/choicdgg.cpp index c796c30ba4..9075821e5f 100644 --- a/src/generic/choicdgg.cpp +++ b/src/generic/choicdgg.cpp @@ -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 );