From: Julian Smart Date: Mon, 20 May 2002 16:16:28 +0000 (+0000) Subject: Applied drag fix to row labels as well X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/426b2d879576f868b7b0a5193dd3eb83c6ad9cf7 Applied drag fix to row labels as well git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15612 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index b91e97dca5..5ff1ee3ecb 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -4397,7 +4397,11 @@ void wxGrid::ProcessRowLabelMouseEvent( wxMouseEvent& event ) if ( event.Dragging() ) { - m_isDragging = TRUE; + if (!m_isDragging) + { + m_isDragging = TRUE; + m_rowLabelWin->CaptureMouse(); + } if ( event.LeftIsDown() ) { @@ -4443,8 +4447,14 @@ void wxGrid::ProcessRowLabelMouseEvent( wxMouseEvent& event ) return; } - m_isDragging = FALSE; + if ( m_isDragging && (event.Entering() || event.Leaving()) ) + return; + if (m_isDragging) + { + m_rowLabelWin->ReleaseMouse(); + m_isDragging = FALSE; + } // ------------ Entering or leaving the window //