we don't need to manually propagate wxHelpEvents upwards, they're already wxCommandEvents and so propagate by default
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39688 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -223,22 +223,13 @@ bool wxContextHelpEvtHandler::ProcessEvent(wxEvent& event)
|
|||||||
// Dispatch the help event to the relevant window
|
// Dispatch the help event to the relevant window
|
||||||
bool wxContextHelp::DispatchEvent(wxWindow* win, const wxPoint& pt)
|
bool wxContextHelp::DispatchEvent(wxWindow* win, const wxPoint& pt)
|
||||||
{
|
{
|
||||||
wxWindow* subjectOfHelp = win;
|
wxCHECK_MSG( win, false, _T("win parameter can't be NULL") );
|
||||||
bool eventProcessed = false;
|
|
||||||
while (subjectOfHelp && !eventProcessed)
|
|
||||||
{
|
|
||||||
wxHelpEvent helpEvent(wxEVT_HELP, subjectOfHelp->GetId(), pt,
|
|
||||||
wxHelpEvent::Origin_HelpButton);
|
|
||||||
helpEvent.SetEventObject(subjectOfHelp);
|
|
||||||
|
|
||||||
eventProcessed = win->GetEventHandler()->ProcessEvent(helpEvent);
|
wxHelpEvent helpEvent(wxEVT_HELP, win->GetId(), pt,
|
||||||
|
wxHelpEvent::Origin_HelpButton);
|
||||||
|
helpEvent.SetEventObject(win);
|
||||||
|
|
||||||
// Go up the window hierarchy until the event is handled (or not).
|
return win->GetEventHandler()->ProcessEvent(helpEvent);
|
||||||
// I.e. keep submitting ancestor windows until one is recognised
|
|
||||||
// by the app code that processes the ids and displays help.
|
|
||||||
subjectOfHelp = subjectOfHelp->GetParent();
|
|
||||||
}
|
|
||||||
return eventProcessed;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user