diff --git a/src/BatchProcessDialog.cpp b/src/BatchProcessDialog.cpp index 8ae90be90..8413f5206 100644 --- a/src/BatchProcessDialog.cpp +++ b/src/BatchProcessDialog.cpp @@ -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)) diff --git a/src/Menus.cpp b/src/Menus.cpp index 3ab177aa3..80a4c3db4 100644 --- a/src/Menus.cpp +++ b/src/Menus.cpp @@ -6423,8 +6423,7 @@ void AudacityProject::OnEditLabels() void AudacityProject::OnApplyChain() { - // Bug1299: Make Track panel the parent so it gets focus back - BatchProcessDialog dlg(GetTrackPanel()); + BatchProcessDialog dlg(this); dlg.ShowModal(); ModifyUndoMenuItems(); }