From 010007ba1749f75236cc0c0fbd362869936feee9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 21 Aug 2020 02:29:17 +0200 Subject: [PATCH] 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). --- src/generic/gridsel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generic/gridsel.cpp b/src/generic/gridsel.cpp index 4ab51f784d..abb25a06a6 100644 --- a/src/generic/gridsel.cpp +++ b/src/generic/gridsel.cpp @@ -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; }