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

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

This commit is contained in:
Paul Licameli 2016-01-27 15:01:03 -05:00
commit 08c27ad226
2 changed files with 7 additions and 6 deletions

View File

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

View File

@ -6423,8 +6423,7 @@ void AudacityProject::OnEditLabels()
void AudacityProject::OnApplyChain() void AudacityProject::OnApplyChain()
{ {
// Bug1299: Make Track panel the parent so it gets focus back BatchProcessDialog dlg(this);
BatchProcessDialog dlg(GetTrackPanel());
dlg.ShowModal(); dlg.ShowModal();
ModifyUndoMenuItems(); ModifyUndoMenuItems();
} }