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:
parent
b4a0ca1ade
commit
baff0c942b
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user