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.
This commit is contained in:
Vadim Zeitlin
2020-04-15 16:16:00 +02:00
parent 51ea80b701
commit 44c3e626b3

View File

@@ -5872,7 +5872,7 @@ void wxGrid::OnKeyDown( wxKeyEvent& event )
}
if ( selStart != wxGridNoCellCoords )
m_selection->SelectBlock(selStart, selEnd);
m_selection->ExtendCurrentBlock(selStart, selEnd, event);
}
break;