From d71d1a50e591fddb8a5b871732bcbacab4cd2c2a 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 (cherry picked from commit 50435ef67831dc3ab356864a88fb259d82ca7dc3) --- 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 6acb6833f9..e80ae70ff3 100644 --- a/src/generic/choicdgg.cpp +++ b/src/generic/choicdgg.cpp @@ -390,7 +390,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 );