X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/31e1bd370d2ded34d97f4824029adb924a0a58a4..855f31ebe72bef834a32df2c274b41fb282ad265:/src/common/containr.cpp diff --git a/src/common/containr.cpp b/src/common/containr.cpp index d465bc0511..3333232ec5 100644 --- a/src/common/containr.cpp +++ b/src/common/containr.cpp @@ -307,8 +307,15 @@ void wxControlContainer::HandleOnNavigationKey( wxNavigationKeyEvent& event ) } } - if ( bookctrl && bookctrl->GetEventHandler()->ProcessEvent(event) ) - return; + if ( bookctrl ) + { + // make sure that we don't bubble up the event again from the book + // control resulting in infinite recursion + wxNavigationKeyEvent eventCopy(event); + eventCopy.SetEventObject(m_winParent); + if ( bookctrl->GetEventHandler()->ProcessEvent(eventCopy) ) + return; + } } // there is not much to do if we don't have children and we're not