]> git.saurik.com Git - wxWidgets.git/commitdiff
redirect to the page only the help events coming from this control itself to avoid...
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 12 Jun 2006 13:32:56 +0000 (13:32 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 12 Jun 2006 13:32:56 +0000 (13:32 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39684 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/bookctrl.cpp

index 2ee818f20c7758147355ff7cbdd497a11b1d98ef..16e4cf3e9a754a91f1bf3db347f6fbb379a1df0d 100644 (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;