Captured mouse in grid column label so the drag isn't prematurely and messily

ended when moving out of the column label window.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15609 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2002-05-20 13:17:31 +00:00
parent 8e40d27b8d
commit fe77cf604a

View File

@@ -4583,7 +4583,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 +4633,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
//