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.

See #17384.

(this is a backport of baff0c942b from master)
This commit is contained in:
Vadim Zeitlin
2016-02-20 13:44:29 +01:00
parent 65c634ed80
commit e7d27c91e6

View File

@@ -222,7 +222,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.