mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-08 08:01:19 +02:00
Update tools menu on changing available chains.
- We recreate the whole menu bar.
This commit is contained in:
parent
e6a2d0f99a
commit
6b54ffdf0f
@ -699,6 +699,14 @@ void EditChainsDialog::AddItem(const wxString &Action, const wxString &Params)
|
||||
mList->SetItem(i, ParamsColumn, Params );
|
||||
}
|
||||
|
||||
void EditChainsDialog::UpdateMenus()
|
||||
{
|
||||
// Mac won't tolerate a menus update during a modal dialog.
|
||||
#ifndef __WXMAC__
|
||||
GetActiveProject()->RebuildMenuBar();
|
||||
#endif
|
||||
}
|
||||
|
||||
bool EditChainsDialog::ChangeOK()
|
||||
{
|
||||
if (mChanged) {
|
||||
@ -879,6 +887,7 @@ void EditChainsDialog::OnAdd(wxCommandEvent & WXUNUSED(event))
|
||||
mActiveChain = name;
|
||||
|
||||
PopulateChains();
|
||||
UpdateMenus();
|
||||
|
||||
break;
|
||||
}
|
||||
@ -913,6 +922,7 @@ void EditChainsDialog::OnRemove(wxCommandEvent & WXUNUSED(event))
|
||||
mActiveChain = mChains->GetItemText(item);
|
||||
|
||||
PopulateChains();
|
||||
UpdateMenus();
|
||||
}
|
||||
|
||||
///
|
||||
@ -926,6 +936,7 @@ void EditChainsDialog::OnRename(wxCommandEvent & WXUNUSED(event))
|
||||
}
|
||||
|
||||
mChains->EditLabel(item);
|
||||
UpdateMenus();
|
||||
}
|
||||
|
||||
/// An item in the list has been selected.
|
||||
|
@ -90,6 +90,7 @@ private:
|
||||
void PopulateList();
|
||||
void AddItem(const wxString &command, wxString const ¶ms);
|
||||
bool ChangeOK();
|
||||
void UpdateMenus();
|
||||
|
||||
void OnChainSelected(wxListEvent &event);
|
||||
void OnListSelected(wxListEvent &event);
|
||||
|
Loading…
x
Reference in New Issue
Block a user