From: Robin Dunn Date: Fri, 20 May 2005 16:17:57 +0000 (+0000) Subject: Set focus to the grid windwo when it is left-clicked X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/33e9fc549ce7d880fc5dc421e8ebbbf2559ce894 Set focus to the grid windwo when it is left-clicked git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34199 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 78e502fc75..66b281a033 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -3758,6 +3758,9 @@ void wxGridWindow::ScrollWindow( int dx, int dy, const wxRect *rect ) void wxGridWindow::OnMouseEvent( wxMouseEvent& event ) { + if (event.ButtonDown(wxMOUSE_BTN_LEFT) && FindFocus() != this) + SetFocus(); + m_owner->ProcessGridCellMouseEvent( event ); }