]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't set focus explicitly in wxGenericListCtrl mouse handling code.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 7 Oct 2012 22:40:06 +0000 (22:40 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 7 Oct 2012 22:40:06 +0000 (22:40 +0000)
Just skip the event to allow the system to set the focus to the control
itself. This is more consistent with the other controls and should result in
correct behaviour everywhere automatically.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/listctrl.cpp

index e8e6b26b34c125b32bb168797631766b90eb827b..a5aee6314b081d7def6f6c92d4142035691eae55 100644 (file)
@@ -2300,7 +2300,10 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
 #endif // __WXMAC__
 
     if ( event.LeftDown() )
-        SetFocus();
+    {
+        // Ensure we skip the event to let the system set focus to this window.
+        event.Skip();
+    }
 
     // Pretend that the event happened in wxListCtrl itself.
     wxMouseEvent me(event);