From d20eef8ac8294fa3623bf1ba005abf56b4837041 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 23 Feb 1999 22:53:48 +0000 Subject: [PATCH] menu help string fix git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1767 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/frame.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index 2f9d0dabb7..03a362b615 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -878,21 +878,16 @@ void wxFrame::OnMenuHighlight(wxMenuEvent& event) { if (GetStatusBar()) { - if (event.GetMenuId() == -1) - SetStatusText(""); - else + int menuId = event.GetMenuId(); + if ( menuId != -1 ) { wxMenuBar *menuBar = GetMenuBar(); if (menuBar) { -// #ifndef __SALFORDC__ - int menuId = event.GetMenuId(); - wxString helpString; - // This causes a spurious access violation with Salford C++ - helpString = menuBar->GetHelpString(menuId); - if (helpString != "") - SetStatusText(helpString); -// #endif + // set status text even if the string is empty - this will at + // least remove the string from the item which was previously + // selected + SetStatusText(menuBar->GetHelpString(menuId)); } } }