From 44c3e626b308003b402999a8e975daa931e0c2a7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 15 Apr 2020 16:16:00 +0200 Subject: [PATCH] Extend current selection on {Ctrl,Shift}-Space Extend the existing selection instead of adding a new block, as there is no reason to keep the old selection as a separate block, when it's always a subblock of the new one, and doing it resulted in wrong behaviour when selecting 2 horizontally adjacent cells, pressing Ctrl-Space and then pressing Shift-Left deselected the rightmost selected column but still left its single cell, which was part of the originally selected block, selected, which was surprising and looked wrong. --- src/generic/grid.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 8e64c9331b..adbf19cc61 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -5872,7 +5872,7 @@ void wxGrid::OnKeyDown( wxKeyEvent& event ) } if ( selStart != wxGridNoCellCoords ) - m_selection->SelectBlock(selStart, selEnd); + m_selection->ExtendCurrentBlock(selStart, selEnd, event); } break;