mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-19 17:11:12 +02:00
Fix for bug #40.
Whenever a menu is NOT open, the accelerator keys are stripped from the menu items so that the O/S doesn't even know that accelerators are being used (we do it internally). While this stripping was being down when the menus are set up, it was NOT being down when the Undo and Redo menu items were modified to include the "last action". So, the fix is to strip the accelerator then as well.
This commit is contained in:
@@ -846,11 +846,7 @@ void CommandManager::Modify(wxString name, wxString newLabel)
|
||||
{
|
||||
CommandListEntry *entry = mCommandNameHash[name];
|
||||
if (entry && entry->menu) {
|
||||
newLabel = newLabel.BeforeFirst(wxT('\t'));
|
||||
if (!entry->key.IsEmpty())
|
||||
newLabel = newLabel + wxT("\t") + entry->key;
|
||||
entry->label = newLabel;
|
||||
entry->menu->SetLabel(entry->id, newLabel);
|
||||
entry->menu->SetLabel(entry->id, newLabel.BeforeFirst(wxT('\t')));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user