From: Julian Smart Date: Mon, 24 Mar 2003 21:00:11 +0000 (+0000) Subject: Applied patch [ 705663 ] Fix capture mouse bug in wxGrid X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f40f9976fd085fd6d2099de861159bb1062a8f46 Applied patch [ 705663 ] Fix capture mouse bug in wxGrid git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 7a3e26851c..f60e2bced6 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -5406,15 +5406,15 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event ) { if ( m_cursorMode == WXGRID_CURSOR_SELECT_CELL ) { + if (m_winCapture) + { + if (m_winCapture->HasCapture()) m_winCapture->ReleaseMouse(); + m_winCapture = NULL; + } + if ( m_selectingTopLeft != wxGridNoCellCoords && m_selectingBottomRight != wxGridNoCellCoords ) { - if (m_winCapture) - { - if (m_winCapture->HasCapture()) m_winCapture->ReleaseMouse(); - m_winCapture = NULL; - } - if ( m_selection ) { m_selection->SelectBlock( m_selectingTopLeft.GetRow(),