X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1af546bfc355e09282958ae1187ed29bef65b04d..b72aa48cdeca3530ffb6ac5af438835d58bf79d9:/src/generic/grid.cpp?ds=sidebyside diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 024de20fb0..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 // @@ -4583,7 +4593,11 @@ void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event ) if ( event.Dragging() ) { - m_isDragging = TRUE; + if (!m_isDragging) + { + m_isDragging = TRUE; + m_colLabelWin->CaptureMouse(); + } if ( event.LeftIsDown() ) { @@ -4629,8 +4643,14 @@ void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event ) return; } - m_isDragging = FALSE; + if ( m_isDragging && (event.Entering() || event.Leaving()) ) + return; + if (m_isDragging) + { + m_colLabelWin->ReleaseMouse(); + m_isDragging = FALSE; + } // ------------ Entering or leaving the window //