1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-08 16:11:14 +02:00

Bug1299 again: Better fix, to restore window focus after applying a chain.

This commit is contained in:
Paul Licameli 2016-01-27 14:58:51 -05:00
parent 074d0daf3d
commit c7eca2c657

View File

@ -197,7 +197,6 @@ void BatchProcessDialog::OnApplyToProject(wxCommandEvent & WXUNUSED(event))
return;
}
wxWindow * pWnd = this->GetParent();
#if !defined(__WXMAC__)
// Under Linux an EndModal() here crashes (Bug #1221).
// But sending a close message instead is OK.
@ -208,7 +207,9 @@ void BatchProcessDialog::OnApplyToProject(wxCommandEvent & WXUNUSED(event))
#else
EndModal(wxID_OK);
#endif
pWnd->SetFocus();
// Raise myself again, and the parent window with me
Show();
}
void BatchProcessDialog::OnApplyToFiles(wxCommandEvent & WXUNUSED(event))
@ -368,7 +369,6 @@ void BatchProcessDialog::OnApplyToFiles(wxCommandEvent & WXUNUSED(event))
}
project->OnRemoveTracks();
wxWindow * pWnd = this->GetParent();
// Under Linux an EndModal() here crashes (Bug #1221).
// But sending a close message instead is OK.
#if !defined(__WXMAC__)
@ -379,7 +379,9 @@ void BatchProcessDialog::OnApplyToFiles(wxCommandEvent & WXUNUSED(event))
#else
EndModal(wxID_OK);
#endif
pWnd->SetFocus();
// Raise myself again, and the parent window with me
Show();
}
void BatchProcessDialog::OnCancel(wxCommandEvent & WXUNUSED(event))