From: Václav Slavík Date: Sat, 26 Jun 2004 15:51:42 +0000 (+0000) Subject: doubleclick selects cell for editing X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/1ef49ab576d21e0428eacf26c98a2f0fb62cb94d?hp=a3c15d892d21e938f3e53dfa81c62eb5da4ce3c8 doubleclick selects cell for editing git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index c68571a1a2..ea0184e2d0 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -5543,11 +5543,17 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event ) if ( XToEdgeOfCol(x) < 0 && YToEdgeOfRow(y) < 0 ) { - SendEvent( wxEVT_GRID_CELL_LEFT_DCLICK, - coords.GetRow(), - coords.GetCol(), - event ); + if ( !SendEvent( wxEVT_GRID_CELL_LEFT_DCLICK, + coords.GetRow(), + coords.GetCol(), + event ) ) + { + // we want double click to select a cell and start editing + // (i.e. to behave in same way as sequence of two slow clicks): + m_waitForSlowClick = true; + } } + }