]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/menucmn.cpp
Use the data scheme to load resources in the WebKitGTK+ implementation, rather than...
[wxWidgets.git] / src / common / menucmn.cpp
index 32f525d6738544b0d3d6ea1f71e37cb3e33cd8e9..d53056d9ee3ff34fedc5ec5240e31639c1105672 100644 (file)
@@ -597,17 +597,18 @@ wxMenuItem* wxMenuBase::FindItemByPosition(size_t position) const
 // window will be used.
 void wxMenuBase::UpdateUI(wxEvtHandler* source)
 {
 // window will be used.
 void wxMenuBase::UpdateUI(wxEvtHandler* source)
 {
-    if (GetInvokingWindow())
+    wxWindow * const win = GetWindow();
+    if ( win )
     {
         // Don't update menus if the parent
         // frame is about to get deleted
     {
         // Don't update menus if the parent
         // frame is about to get deleted
-        wxWindow *tlw = wxGetTopLevelParent( GetInvokingWindow() );
+        wxWindow *tlw = wxGetTopLevelParent(win);
         if (tlw && wxPendingDelete.Member(tlw))
             return;
     }
 
         if (tlw && wxPendingDelete.Member(tlw))
             return;
     }
 
-    if ( !source && GetInvokingWindow() )
-        source = GetInvokingWindow()->GetEventHandler();
+    if ( !source && win )
+        source = win->GetEventHandler();
     if ( !source )
         source = GetEventHandler();
     if ( !source )
     if ( !source )
         source = GetEventHandler();
     if ( !source )