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
This commit is contained in:
Vadim Zeitlin
2006-06-16 12:48:54 +00:00
parent 6bdcf0b143
commit cb5bc9b7e2

View 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();
}