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