git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4312
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxString helpString;
int menuId = event.GetMenuId();
- if ( menuId != -1 )
+ if ( menuId != wxID_SEPARATOR && menuId != -2 /* wxID_TITLE */ )
{
wxMenuBar *menuBar = GetMenuBar();
- if (menuBar)
+ if ( menuBar )
{
- helpString = menuBar->GetHelpString(menuId);
+ // it's ok if we don't find the item because it might belong to
+ // the popup menu
+ wxMenuItem *item = menuBar->FindItem(menuId);
+ if ( item )
+ helpString = item->GetHelp();
}
}
wxString helpString;
int menuId = event.GetMenuId();
- if ( menuId != -1 )
+ if ( menuId != wxID_SEPARATOR && menuId != -2 /* wxID_TITLE */ )
{
wxMenuBar *menuBar = GetMenuBar();
- if (menuBar)
+ if ( menuBar )
{
- helpString = menuBar->GetHelpString(menuId);
+ // it's ok if we don't find the item because it might belong to
+ // the popup menu
+ wxMenuItem *item = menuBar->FindItem(menuId);
+ if ( item )
+ helpString = item->GetHelp();
}
}