1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-11 17:13:37 +02:00

Must delete window disabler before the ending the dialog

This commit is contained in:
Leland Lucius
2015-07-24 00:02:19 -05:00
parent d98b588798
commit 44c9a7b864

View File

@@ -175,15 +175,23 @@ void BatchProcessDialog::OnApplyToProject(wxCommandEvent & WXUNUSED(event))
d.Show();
Hide();
wxWindowDisabler wd;
gPrefs->Write(wxT("/Batch/ActiveChain"), name);
gPrefs->Flush();
mBatchCommands.ReadChain(name);
if (!mBatchCommands.ApplyChain()) {
// The disabler must get deleted before the EndModal() call. Otherwise,
// the menus on OSX will remain disabled.
wxWindowDisabler *wd = new wxWindowDisabler(&d);
bool success = mBatchCommands.ApplyChain();
delete wd;
if (!success) {
Show();
return;
}
EndModal(wxID_OK);
}
void BatchProcessDialog::OnApplyToFiles(wxCommandEvent & WXUNUSED(event))
@@ -342,11 +350,13 @@ void BatchProcessDialog::OnApplyToFiles(wxCommandEvent & WXUNUSED(event))
project->OnRemoveTracks();
}
project->OnRemoveTracks();
EndModal(wxID_OK);
}
void BatchProcessDialog::OnCancel(wxCommandEvent & WXUNUSED(event))
{
EndModal(false);
EndModal(wxID_CANCEL);
}
/////////////////////////////////////////////////////////////////////