mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-08 16:11:14 +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 );
|
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()
|
bool EditChainsDialog::ChangeOK()
|
||||||
{
|
{
|
||||||
if (mChanged) {
|
if (mChanged) {
|
||||||
@ -879,6 +887,7 @@ void EditChainsDialog::OnAdd(wxCommandEvent & WXUNUSED(event))
|
|||||||
mActiveChain = name;
|
mActiveChain = name;
|
||||||
|
|
||||||
PopulateChains();
|
PopulateChains();
|
||||||
|
UpdateMenus();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -913,6 +922,7 @@ void EditChainsDialog::OnRemove(wxCommandEvent & WXUNUSED(event))
|
|||||||
mActiveChain = mChains->GetItemText(item);
|
mActiveChain = mChains->GetItemText(item);
|
||||||
|
|
||||||
PopulateChains();
|
PopulateChains();
|
||||||
|
UpdateMenus();
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
@ -926,6 +936,7 @@ void EditChainsDialog::OnRename(wxCommandEvent & WXUNUSED(event))
|
|||||||
}
|
}
|
||||||
|
|
||||||
mChains->EditLabel(item);
|
mChains->EditLabel(item);
|
||||||
|
UpdateMenus();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An item in the list has been selected.
|
/// An item in the list has been selected.
|
||||||
|
@ -90,6 +90,7 @@ private:
|
|||||||
void PopulateList();
|
void PopulateList();
|
||||||
void AddItem(const wxString &command, wxString const ¶ms);
|
void AddItem(const wxString &command, wxString const ¶ms);
|
||||||
bool ChangeOK();
|
bool ChangeOK();
|
||||||
|
void UpdateMenus();
|
||||||
|
|
||||||
void OnChainSelected(wxListEvent &event);
|
void OnChainSelected(wxListEvent &event);
|
||||||
void OnListSelected(wxListEvent &event);
|
void OnListSelected(wxListEvent &event);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user