]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/containr.cpp
source id type is unsigned; minor cleanup
[wxWidgets.git] / src / common / containr.cpp
index d465bc0511ad076e86368d72f78fa0d319500b66..3333232ec59e31e61aa101a4d06750037aff463a 100644 (file)
@@ -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