Remove superfluous mouse capturing in wxGrid row/column labels windows.

This code recaptured the mouse in the window which had already had it, thus
triggering the (recently added, see r74677) asserts in CaptureMouse(). It also
didn't preserve the invariant of m_winCapture always having the capture. And
it was apparently completely unnecessary too.

So simply remove it to fix the asserts while drag-resizing wxGrid rows/columns.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-09-04 00:14:13 +00:00
parent 8965331963
commit c7ea5a0c7e

View File

@@ -3266,10 +3266,7 @@ void wxGrid::ProcessRowLabelMouseEvent( wxMouseEvent& event )
if ( event.Dragging() )
{
if (!m_isDragging)
{
m_isDragging = true;
m_rowLabelWin->CaptureMouse();
}
if ( event.LeftIsDown() )
{
@@ -3319,11 +3316,7 @@ void wxGrid::ProcessRowLabelMouseEvent( wxMouseEvent& event )
return;
if (m_isDragging)
{
if (m_rowLabelWin->HasCapture())
m_rowLabelWin->ReleaseMouse();
m_isDragging = false;
}
// ------------ Entering or leaving the window
//
@@ -3550,7 +3543,6 @@ void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event )
if (!m_isDragging)
{
m_isDragging = true;
GetColLabelWindow()->CaptureMouse();
if ( m_cursorMode == WXGRID_CURSOR_MOVE_COL && col != -1 )
DoStartMoveCol(col);
@@ -3641,11 +3633,7 @@ void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event )
return;
if (m_isDragging)
{
if (GetColLabelWindow()->HasCapture())
GetColLabelWindow()->ReleaseMouse();
m_isDragging = false;
}
// ------------ Entering or leaving the window
//