GetMenuBar() now traverses up the hierarchy so it no longer has to be done here.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26478 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -657,13 +657,8 @@ static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu )
|
||||
|
||||
// Is this menu on a menubar? (possibly nested)
|
||||
wxFrame* frame = NULL;
|
||||
wxMenu* pm = menu;
|
||||
while ( pm && !frame )
|
||||
{
|
||||
if ( pm->IsAttached() )
|
||||
frame = pm->GetMenuBar()->GetFrame();
|
||||
pm = pm->GetParent();
|
||||
}
|
||||
if(menu->IsAttached())
|
||||
frame = menu->GetMenuBar()->GetFrame();
|
||||
|
||||
// FIXME: why do we have to call wxFrame::GetEventHandler() directly here?
|
||||
// normally wxMenu::SendEvent() should be enough, if it doesn't work
|
||||
|
Reference in New Issue
Block a user