redirect to the page only the help events coming from this control itself to avoid infinite recursion when we get a help event originally sent to the page
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39684 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -164,6 +164,15 @@ wxSize wxBookCtrlBase::DoGetBestSize() const
|
|||||||
#if wxUSE_HELP
|
#if wxUSE_HELP
|
||||||
void wxBookCtrlBase::OnHelp(wxHelpEvent& event)
|
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
|
// find the corresponding page
|
||||||
wxWindow *page = NULL;
|
wxWindow *page = NULL;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user