Fix the cursor mode switching in wxGrid mouse move event handler

Allow switching between row and column resizing modes in mouse move event
handler.
This commit is contained in:
Ilya Sinitsyn
2020-08-17 21:12:02 +07:00
committed by Vadim Zeitlin
parent 5d3d376766
commit 0e8ca0c8f9

View File

@@ -4714,14 +4714,14 @@ wxGrid::DoGridMouseMoveEvent(wxMouseEvent& WXUNUSED(event),
// cell corner, as this is a more common operation. // cell corner, as this is a more common operation.
if ( dragCol >= 0 && CanDragGridColEdges() && CanDragColSize(dragCol) ) if ( dragCol >= 0 && CanDragGridColEdges() && CanDragColSize(dragCol) )
{ {
if ( m_cursorMode == WXGRID_CURSOR_SELECT_CELL ) if ( m_cursorMode != WXGRID_CURSOR_RESIZE_COL )
{ {
ChangeCursorMode(WXGRID_CURSOR_RESIZE_COL, gridWindow, false); ChangeCursorMode(WXGRID_CURSOR_RESIZE_COL, gridWindow, false);
} }
} }
else if ( dragRow >= 0 && CanDragGridRowEdges() && CanDragRowSize(dragRow) ) else if ( dragRow >= 0 && CanDragGridRowEdges() && CanDragRowSize(dragRow) )
{ {
if ( m_cursorMode == WXGRID_CURSOR_SELECT_CELL ) if ( m_cursorMode != WXGRID_CURSOR_RESIZE_ROW)
{ {
ChangeCursorMode(WXGRID_CURSOR_RESIZE_ROW, gridWindow, false); ChangeCursorMode(WXGRID_CURSOR_RESIZE_ROW, gridWindow, false);
} }