Fix type of the initial wxGrid selection event when dragging

Pass the same eventType ExtendCurrentBlock() is called with to
SelectBlock() called to perform the initial selection to ensure that
wxEVT_GRID_RANGE_SELECTING is sent while dragging instead of the
unexpected wxEVT_GRID_RANGE_SELECTED (in addition to the expected one
sent at the end when the drag is over).
This commit is contained in:
Vadim Zeitlin 2020-08-21 02:29:17 +02:00
parent 6d6c01ff2a
commit 010007ba17

View File

@ -526,7 +526,7 @@ bool wxGridSelection::ExtendCurrentBlock(const wxGridCellCoords& blockStart,
// block to non-selected current cell.
if ( !IsInSelection(m_grid->GetGridCursorCoords()) )
{
SelectBlock(blockStart, blockEnd);
SelectBlock(blockStart, blockEnd, kbd, eventType);
return true;
}