]> git.saurik.com Git - wxWidgets.git/commitdiff
don't loop needlessly in OnHelp() if the event comes from the bookctrl itself
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 16 Jun 2006 12:48:54 +0000 (12:48 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 16 Jun 2006 12:48:54 +0000 (12:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39765 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/bookctrl.cpp

index d1e7bcbe019159228f25cc4b62627632e1312470..c0b1eedd9cdc1f7e03beaa4023c2ff2d746e155d 100644 (file)
@@ -172,7 +172,7 @@ void wxBookCtrlBase::OnHelp(wxHelpEvent& event)
     // if the event object == this because the book control can have other
     // subcontrols inside it (e.g. wxSpinButton in case of a notebook in wxUniv)
     wxWindow *source = wxStaticCast(event.GetEventObject(), wxWindow);
-    while ( source && source->GetParent() != this )
+    while ( source && source != this && source->GetParent() != this )
     {
         source = source->GetParent();
     }