]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/menucmn.cpp
Add missing WXK constants for the control keys
[wxWidgets.git] / src / common / menucmn.cpp
index d53056d9ee3ff34fedc5ec5240e31639c1105672..f34a5bf0f6b43ce247da9a2c2a136f7fcfd9e0f8 100644 (file)
@@ -598,14 +598,6 @@ wxMenuItem* wxMenuBase::FindItemByPosition(size_t position) const
 void wxMenuBase::UpdateUI(wxEvtHandler* source)
 {
     wxWindow * const win = GetWindow();
-    if ( win )
-    {
-        // Don't update menus if the parent
-        // frame is about to get deleted
-        wxWindow *tlw = wxGetTopLevelParent(win);
-        if (tlw && wxPendingDelete.Member(tlw))
-            return;
-    }
 
     if ( !source && win )
         source = win->GetEventHandler();
@@ -622,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) )
             {
@@ -1046,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 );
     }
 }