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:
@@ -172,7 +172,7 @@ void wxBookCtrlBase::OnHelp(wxHelpEvent& event)
|
|||||||
// if the event object == this because the book control can have other
|
// 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)
|
// subcontrols inside it (e.g. wxSpinButton in case of a notebook in wxUniv)
|
||||||
wxWindow *source = wxStaticCast(event.GetEventObject(), wxWindow);
|
wxWindow *source = wxStaticCast(event.GetEventObject(), wxWindow);
|
||||||
while ( source && source->GetParent() != this )
|
while ( source && source != this && source->GetParent() != this )
|
||||||
{
|
{
|
||||||
source = source->GetParent();
|
source = source->GetParent();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user