X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9df70d797b1c2b5913cc8628ca00b97d7bfeb23f..64ea838d8f4d1853b7d850db93ee565e901d099a:/src/common/menucmn.cpp diff --git a/src/common/menucmn.cpp b/src/common/menucmn.cpp index 9f7d8128c5..f34a5bf0f6 100644 --- a/src/common/menucmn.cpp +++ b/src/common/menucmn.cpp @@ -614,7 +614,7 @@ void wxMenuBase::UpdateUI(wxEvtHandler* source) { wxWindowID itemid = item->GetId(); wxUpdateUIEvent event(itemid); - event.SetEventObject( source ); + event.SetEventObject( this ); if ( source->ProcessEvent(event) ) { @@ -1038,18 +1038,13 @@ wxString wxMenuBarBase::GetHelpString(int itemid) const void wxMenuBarBase::UpdateMenus() { - wxEvtHandler* source; wxMenu* menu; int nCount = GetMenuCount(); for (int n = 0; n < nCount; n++) { menu = GetMenu( n ); if (menu != NULL) - { - source = menu->GetEventHandler(); - if (source != NULL) - menu->UpdateUI( source ); - } + menu->UpdateUI( NULL ); } }