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:
@@ -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.
|
||||
|
Reference in New Issue
Block a user