menu help string fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1767 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
634903fd04
commit
d20eef8ac8
@ -878,21 +878,16 @@ void wxFrame::OnMenuHighlight(wxMenuEvent& event)
|
|||||||
{
|
{
|
||||||
if (GetStatusBar())
|
if (GetStatusBar())
|
||||||
{
|
{
|
||||||
if (event.GetMenuId() == -1)
|
int menuId = event.GetMenuId();
|
||||||
SetStatusText("");
|
if ( menuId != -1 )
|
||||||
else
|
|
||||||
{
|
{
|
||||||
wxMenuBar *menuBar = GetMenuBar();
|
wxMenuBar *menuBar = GetMenuBar();
|
||||||
if (menuBar)
|
if (menuBar)
|
||||||
{
|
{
|
||||||
// #ifndef __SALFORDC__
|
// set status text even if the string is empty - this will at
|
||||||
int menuId = event.GetMenuId();
|
// least remove the string from the item which was previously
|
||||||
wxString helpString;
|
// selected
|
||||||
// This causes a spurious access violation with Salford C++
|
SetStatusText(menuBar->GetHelpString(menuId));
|
||||||
helpString = menuBar->GetHelpString(menuId);
|
|
||||||
if (helpString != "")
|
|
||||||
SetStatusText(helpString);
|
|
||||||
// #endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user