Fix accel handling when removing item from submenu
wxMSW propagates accelerators to the top menu in wxMenu::UpdateAccel(), but the reverse operation in wxMenu::DoRemove() didn't do it, resulting in leaked leftover accelerator entries that could prevent the same accelerator from working if an item using it was later added. Fix by adding RemoveAccel() helper method that behaves analogously to UpdateAccel().
This commit is contained in:
@@ -76,6 +76,7 @@ public:
|
||||
|
||||
// called by wxMenuItem when its accels changes
|
||||
void UpdateAccel(wxMenuItem *item);
|
||||
void RemoveAccel(wxMenuItem *item);
|
||||
|
||||
// helper used by wxMenu itself (returns the index in m_accels)
|
||||
int FindAccel(int id) const;
|
||||
|
Reference in New Issue
Block a user