bug corrected
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -940,12 +940,16 @@ void wxFrame::OnMenuHighlight(wxMenuEvent& event)
|
|||||||
wxString helpString;
|
wxString helpString;
|
||||||
|
|
||||||
int menuId = event.GetMenuId();
|
int menuId = event.GetMenuId();
|
||||||
if ( menuId != -1 )
|
if ( menuId != wxID_SEPARATOR && menuId != -2 /* wxID_TITLE */ )
|
||||||
{
|
{
|
||||||
wxMenuBar *menuBar = GetMenuBar();
|
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;
|
wxString helpString;
|
||||||
|
|
||||||
int menuId = event.GetMenuId();
|
int menuId = event.GetMenuId();
|
||||||
if ( menuId != -1 )
|
if ( menuId != wxID_SEPARATOR && menuId != -2 /* wxID_TITLE */ )
|
||||||
{
|
{
|
||||||
wxMenuBar *menuBar = GetMenuBar();
|
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user