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:
@@ -221,7 +221,7 @@ int wxDirDialog::ShowModal()
|
|||||||
{
|
{
|
||||||
WX_HOOK_MODAL_DIALOG();
|
WX_HOOK_MODAL_DIALOG();
|
||||||
|
|
||||||
wxWindow* const parent = GetParent();
|
wxWindow* const parent = GetParentForModalDialog();
|
||||||
WXHWND hWndParent = parent ? GetHwndOf(parent) : NULL;
|
WXHWND hWndParent = parent ? GetHwndOf(parent) : NULL;
|
||||||
|
|
||||||
// Use IFileDialog under new enough Windows, it's more user-friendly.
|
// Use IFileDialog under new enough Windows, it's more user-friendly.
|
||||||
|
Reference in New Issue
Block a user