From baff0c942b23c571fdfab7fd1c1c2622ddc1c2c5 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 20 Feb 2016 13:42:12 +0100 Subject: [PATCH] Try to always give wxDirDialog a valid parent in wxMSW Use the same GetParentForModalDialog() method as for the normal dialogs to find the parent to use for this native dialog and ensure that it is shown modally even if no parent is explicitly specified when constructing it. Closes #17384. --- src/msw/dirdlg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/dirdlg.cpp b/src/msw/dirdlg.cpp index 384a50b9e0..a2bffb09ba 100644 --- a/src/msw/dirdlg.cpp +++ b/src/msw/dirdlg.cpp @@ -221,7 +221,7 @@ int wxDirDialog::ShowModal() { WX_HOOK_MODAL_DIALOG(); - wxWindow* const parent = GetParent(); + wxWindow* const parent = GetParentForModalDialog(); WXHWND hWndParent = parent ? GetHwndOf(parent) : NULL; // Use IFileDialog under new enough Windows, it's more user-friendly.