1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-01 14:43:48 +01:00

Bug1409 again: Dismiss Mac help window, be sure parent regains focus

This commit is contained in:
Paul Licameli
2016-06-22 13:42:03 -04:00
parent 56acdf684c
commit 9d506cd850

View File

@@ -57,8 +57,18 @@ void BrowserDialog::OnBackward(wxCommandEvent & WXUNUSED(event))
void BrowserDialog::OnClose(wxCommandEvent & WXUNUSED(event))
{
EndModal(wxID_CANCEL);
#ifndef __WXMAC__
GetParent()->Destroy();
auto parent = GetParent();
#ifdef __WXMAC__
auto grandparent = GetParent()->GetParent();
#endif
parent->Destroy();
#ifdef __WXMAC__
if(grandparent && grandparent->IsShown()) {
grandparent->Raise();
}
#endif
}