mdi menu updates fixed (after SF 1012653)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -300,6 +300,34 @@ void wxMDIParentFrame::SetWindowMenu(wxMenu* menu)
|
||||
}
|
||||
}
|
||||
|
||||
void wxMDIParentFrame::DoMenuUpdates(wxMenu* menu)
|
||||
{
|
||||
wxMDIChildFrame *child = GetActiveChild();
|
||||
if ( child )
|
||||
{
|
||||
wxEvtHandler* source = child->GetEventHandler();
|
||||
wxMenuBar* bar = child->GetMenuBar();
|
||||
|
||||
if (menu)
|
||||
{
|
||||
menu->UpdateUI(source);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( bar != NULL )
|
||||
{
|
||||
int nCount = bar->GetMenuCount();
|
||||
for (int n = 0; n < nCount; n++)
|
||||
bar->GetMenu(n)->UpdateUI(source);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wxFrameBase::DoMenuUpdates(menu);
|
||||
}
|
||||
}
|
||||
|
||||
void wxMDIParentFrame::OnSize(wxSizeEvent&)
|
||||
{
|
||||
if ( GetClientWindow() )
|
||||
|
Reference in New Issue
Block a user