Fix extending selection starting from unselected current cell
Unselected current cell should always be considered as the current selection block to extend, as it doesn't make sense to extend any other block (perhaps selected on another side of the grid) when pressing Shift-arrow. This scenario could be achieved by selecting a block and Ctrl-clicking a cell (either inside or outside the selection) twice and then extending it using Shift-arrow keys. Previously, this behaved in a strange way, combining the corner of the selected block with the target of the movement, whereas now this just starts selecting a new block from the current cell as expected.
This commit is contained in:
@@ -68,9 +68,11 @@ public:
|
||||
void UpdateCols( size_t pos, int numCols );
|
||||
|
||||
// Extend (or shrink) the current selection block (creating it if
|
||||
// necessary, i.e. if there is no selection at all currently) to the one
|
||||
// specified by the start and end coordinates of its opposite corners
|
||||
// (which don't have to be in top/bottom left/right order).
|
||||
// necessary, i.e. if there is no selection at all currently or if the
|
||||
// current current cell isn't selected, as in this case a new block
|
||||
// containing it is always added) to the one specified by the start and end
|
||||
// coordinates of its opposite corners (which don't have to be in
|
||||
// top/bottom left/right order).
|
||||
//
|
||||
// Note that blockStart is equal to wxGrid::m_currentCellCoords almost
|
||||
// always, but not always (the exception is when we scrolled out from
|
||||
|
Reference in New Issue
Block a user