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.
This commit is contained in:
Vadim Zeitlin 2016-02-20 13:42:12 +01:00
parent b4a0ca1ade
commit baff0c942b

View File

@ -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.