Undid last commit and restored bool argument to wxFrame::DoGiveHelp() as
removing it could silently break existing user code overriding this function. Fix the problem with not restoring the original status bar text when the mouse pointer left the toolbar by simply calling DoGiveHelp() with false as second parameter only if there was no valid tool under mouse, not if the help string (for a valid tool) was empty. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45240 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -628,7 +628,7 @@ void wxToolBarBase::OnMouseEnter(int id)
|
||||
event.SetInt(id);
|
||||
|
||||
wxFrame *frame = wxDynamicCast(GetParent(), wxFrame);
|
||||
if( frame )
|
||||
if ( frame )
|
||||
{
|
||||
wxString help;
|
||||
if ( id != wxID_ANY )
|
||||
@@ -638,9 +638,9 @@ void wxToolBarBase::OnMouseEnter(int id)
|
||||
help = tool->GetLongHelp();
|
||||
}
|
||||
|
||||
// do it even if help string is empty to avoid showing the help for the
|
||||
// previously selected tool when another one is selected
|
||||
frame->DoGiveHelp(help);
|
||||
// call DoGiveHelp() even if help string is empty to avoid showing the
|
||||
// help for the previously selected tool when another one is selected
|
||||
frame->DoGiveHelp(help, id != wxID_ANY);
|
||||
}
|
||||
|
||||
(void)GetEventHandler()->ProcessEvent(event);
|
||||
|
Reference in New Issue
Block a user