redirect to the page only the help events coming from this control itself to avoid infinite recursion when we get a help event originally sent to the page

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39684 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-06-12 13:32:56 +00:00
parent a79848accf
commit b6b4695492

View File

@@ -164,6 +164,15 @@ wxSize wxBookCtrlBase::DoGetBestSize() const
#if wxUSE_HELP
void wxBookCtrlBase::OnHelp(wxHelpEvent& event)
{
// ignore the events not coming from the book control itself, otherwise we
// could attempt to redirect a help event generated by one of our pages
// back to the same page resulting in an infinite loop
if ( event.GetEventObject() != this )
{
event.Skip();
return;
}
// find the corresponding page
wxWindow *page = NULL;