From b80e33a7999b8f70ce9b0a75f741323db09fe055 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 1 Feb 2007 22:52:01 +0000 Subject: [PATCH] Don't capture the mouse until after we're sure we're not sending wxEVT_GRID_CELL_BEGIN_DRAG git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/grid.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 035334b56a..c8e4b7cc5c 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -5921,13 +5921,6 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event ) SaveEditControlValue(); } - // Have we captured the mouse yet? - if (! m_winCapture) - { - m_winCapture = m_gridWin; - m_winCapture->CaptureMouse(); - } - if ( coords != wxGridNoCellCoords ) { if ( event.CmdDown() ) @@ -5947,6 +5940,7 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event ) coords.GetRow(), coords.GetCol(), event ); + return; } } else @@ -5968,6 +5962,14 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event ) // scrolling is way to fast, at least on MSW - also on GTK. } } + // Have we captured the mouse yet? + if (! m_winCapture) + { + m_winCapture = m_gridWin; + m_winCapture->CaptureMouse(); + } + + } else if ( m_cursorMode == WXGRID_CURSOR_RESIZE_ROW ) {