1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-15 23:59:37 +02:00

BatchProcessDialog Close command working again.

Sending a wxCloseEvent doesn't close a Modal dialog (unless we hide it first).
This commit is contained in:
James Crook 2015-10-10 15:27:35 +01:00
parent aee4a33d6b
commit 6d95e68dad

View File

@ -197,6 +197,7 @@ void BatchProcessDialog::OnApplyToProject(wxCommandEvent & WXUNUSED(event))
// Under Linux an EndModal() here is the cause of Bug #1221.
// But sending a close message instead is OK.
wxCloseEvent Evt;
Evt.SetId( wxID_OK );
Evt.SetEventObject( this);
ProcessWindowEvent( Evt );
pWnd->SetFocus();
@ -363,6 +364,7 @@ void BatchProcessDialog::OnApplyToFiles(wxCommandEvent & WXUNUSED(event))
// Under Linux an EndModal() here is the cause of Bug #1221.
// But sending a close message instead is OK.
wxCloseEvent Evt;
Evt.SetId( wxID_OK );
Evt.SetEventObject( this);
ProcessWindowEvent( Evt );
pWnd->SetFocus();
@ -370,12 +372,17 @@ void BatchProcessDialog::OnApplyToFiles(wxCommandEvent & WXUNUSED(event))
void BatchProcessDialog::OnCancel(wxCommandEvent & WXUNUSED(event))
{
#if 1
Hide();
// Under Linux an EndModal() here is the cause of Bug #1221.
// But sending a close message instead is OK.
wxCloseEvent Evt;
Evt.SetId( wxID_CANCEL );
Evt.SetEventObject( this);
ProcessWindowEvent( Evt );
//EndModal(wxID_CANCEL);
#else
EndModal(wxID_CANCEL);
#endif
}
/////////////////////////////////////////////////////////////////////