From b6b4695492baff990f5cb4c50522fd6a72c2773d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 12 Jun 2006 13:32:56 +0000 Subject: [PATCH] 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 --- src/common/bookctrl.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/common/bookctrl.cpp b/src/common/bookctrl.cpp index 2ee818f20c..16e4cf3e9a 100644 --- a/src/common/bookctrl.cpp +++ b/src/common/bookctrl.cpp @@ -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; -- 2.45.2