bug corrected
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
c71830c3b6
commit
10c1d2177a
@ -940,12 +940,16 @@ void wxFrame::OnMenuHighlight(wxMenuEvent& event)
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -940,12 +940,16 @@ void wxFrame::OnMenuHighlight(wxMenuEvent& event)
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user