Add upwards recursion to UpdateAccel method.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
fde0548028
commit
13aca5dd5d
@ -189,6 +189,18 @@ void wxMenu::UpdateAccel(
|
|||||||
}
|
}
|
||||||
else if (!pItem->IsSeparator())
|
else if (!pItem->IsSeparator())
|
||||||
{
|
{
|
||||||
|
//
|
||||||
|
// Recurse upwards: we should only modify m_accels of the top level
|
||||||
|
// menus, not of the submenus as wxMenuBar doesn't look at them
|
||||||
|
// (alternative and arguable cleaner solution would be to recurse
|
||||||
|
// downwards in GetAccelCount() and CopyAccels())
|
||||||
|
//
|
||||||
|
if (GetParent())
|
||||||
|
{
|
||||||
|
GetParent()->UpdateAccel(pItem);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Find the (new) accel for this item
|
// Find the (new) accel for this item
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user