Use the same selection expansion logic for Shift-Ctrl-cursor
Expanding the selection from keyboard with Ctrl pressed should move in the same way Ctrl-cursor does, but use the same selection anchor as Shift-cursor does instead of always using the current cell. This makes the expansion work much more intuitively in the grid, e.g. pressing Shift-Ctrl-Down in 1 2 3 4 grid when 1 and 2 are selected now selects all the cells instead of selecting 1 and 3 as it did before.
This commit is contained in:
@@ -2767,6 +2767,12 @@ private:
|
||||
wxGridWindow *gridWindow) const;
|
||||
int PosToEdgeOfLine(int pos, const wxGridOperations& oper) const;
|
||||
|
||||
// Fill the coords with the cell coordinates to use for the movement
|
||||
// extending the current selection. Return false if, for whatever reason,
|
||||
// we can't expand the selection at all.
|
||||
bool PrepareForSelectionExpansion(wxGridCellCoords& coords,
|
||||
const wxGridDirectionOperations& diroper);
|
||||
|
||||
void DoMoveCursorFromKeyboard(const wxKeyboardState& kbdState,
|
||||
const wxGridDirectionOperations& diroper);
|
||||
bool DoMoveCursor(const wxKeyboardState& kbdState,
|
||||
|
Reference in New Issue
Block a user