diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index ee845891df..4423bfa055 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -4716,24 +4716,10 @@ wxGrid::DoGridMouseMoveEvent(wxMouseEvent& WXUNUSED(event), int dragRow = YToEdgeOfRow( pos.y ); int dragCol = XToEdgeOfCol( pos.x ); - // Dragging on the corner of a cell to resize in both - // directions is not implemented yet... - // - if ( dragRow >= 0 && dragCol >= 0 ) - { - ChangeCursorMode(WXGRID_CURSOR_RESIZE_ROW, gridWindow, false); - return; - } - - if ( dragRow >= 0 && CanDragGridRowEdges() && CanDragRowSize(dragRow) ) - { - if ( m_cursorMode == WXGRID_CURSOR_SELECT_CELL ) - { - DoStartResizeRowOrCol(dragRow); - ChangeCursorMode(WXGRID_CURSOR_RESIZE_ROW, gridWindow, false); - } - } - else if ( dragCol >= 0 && CanDragGridColEdges() && CanDragColSize(dragCol) ) + // Dragging on the corner of a cell to resize in both directions is not + // implemented, so choose to resize the column when the cursor is over the + // cell corner, as this is a more common operation. + if ( dragCol >= 0 && CanDragGridColEdges() && CanDragColSize(dragCol) ) { if ( m_cursorMode == WXGRID_CURSOR_SELECT_CELL ) { @@ -4741,6 +4727,14 @@ wxGrid::DoGridMouseMoveEvent(wxMouseEvent& WXUNUSED(event), ChangeCursorMode(WXGRID_CURSOR_RESIZE_COL, gridWindow, false); } } + else if ( dragRow >= 0 && CanDragGridRowEdges() && CanDragRowSize(dragRow) ) + { + if ( m_cursorMode == WXGRID_CURSOR_SELECT_CELL ) + { + DoStartResizeRowOrCol(dragRow); + ChangeCursorMode(WXGRID_CURSOR_RESIZE_ROW, gridWindow, false); + } + } else // Neither on a row or col edge { if ( m_cursorMode != WXGRID_CURSOR_SELECT_CELL )