mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-02 08:39:46 +02:00
Got a little delete happy in r13707
Removed a line in AddItem() and InsertItem() that didn't seem to make sense (especially given the comment). However, it caused an issue where the key assignment would persist for one last time after leaving Preferences. It would then act as desired.
This commit is contained in:
parent
f677bc00df
commit
4b904f5eb2
@ -418,6 +418,9 @@ void CommandManager::InsertItem(wxString name, wxString label_in,
|
||||
|
||||
int ID = NewIdentifier(name, label, menu, callback, false, 0, 0);
|
||||
|
||||
// Remove the accelerator as it will be handled internally
|
||||
label = label.BeforeFirst(wxT('\t'));
|
||||
|
||||
if (checkmark >= 0) {
|
||||
menu->InsertCheckItem(pos, ID, label);
|
||||
menu->Check(ID, checkmark != 0);
|
||||
@ -425,7 +428,6 @@ void CommandManager::InsertItem(wxString name, wxString label_in,
|
||||
else {
|
||||
menu->Insert(pos, ID, label);
|
||||
}
|
||||
// menu->SetLabel(ID, newLabel);
|
||||
|
||||
mbSeparatorAllowed = true;
|
||||
}
|
||||
@ -480,6 +482,9 @@ void CommandManager::AddItem(const wxChar *name,
|
||||
SetCommandFlags(name, flags, mask);
|
||||
}
|
||||
|
||||
// Remove the accelerator as it will be handled internally
|
||||
label = label.BeforeFirst(wxT('\t'));
|
||||
|
||||
if (checkmark >= 0) {
|
||||
CurrentMenu()->AppendCheckItem(ID, label);
|
||||
CurrentMenu()->Check(ID, checkmark != 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user