bug corrected

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 1999-11-02 17:39:20 +00:00
parent c71830c3b6
commit 10c1d2177a
2 changed files with 14 additions and 6 deletions

View File

@ -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();
}
}

View File

@ -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();
}
}