From cb5bc9b7e2287adf5dd8e92ec72371821f588546 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 16 Jun 2006 12:48:54 +0000 Subject: [PATCH] don't loop needlessly in OnHelp() if the event comes from the bookctrl itself git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39765 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/bookctrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/bookctrl.cpp b/src/common/bookctrl.cpp index d1e7bcbe01..c0b1eedd9c 100644 --- a/src/common/bookctrl.cpp +++ b/src/common/bookctrl.cpp @@ -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(); } -- 2.45.2