]> git.saurik.com Git - wxWidgets.git/commitdiff
wxScrolledWindow can get wxEVT_CHILD_FOCUS event for itself, handle that case too
authorVáclav Slavík <vslavik@fastmail.fm>
Thu, 20 Dec 2007 20:04:46 +0000 (20:04 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Thu, 20 Dec 2007 20:04:46 +0000 (20:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50867 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/scrlwing.cpp

index 0b6c1fcc6e42143a957702293ae796e29aec20ed..7b686a1cf3b316bfe893ed906bab29a034d50788 100644 (file)
@@ -1359,6 +1359,10 @@ void wxScrollHelper::HandleOnChildFocus(wxChildFocusEvent& event)
 
     // find the immediate child under which the window receiving focus is:
     wxWindow *win = event.GetWindow();
+
+    if ( win == m_targetWindow )
+        return; // nothing to do
+
     while ( win->GetParent() != m_targetWindow )
     {
         win = win->GetParent();