Allow extending selection using Shift-Page Up/Down keys

Also make Page Up/Down themselves work consistently with the other
cursor movement keys and clear current selection if they move the
cursor.

Even though DoMoveCursorByPage() is simpler than DoMoveCursorByBlock(),
still factor out AdvanceByPage() for consistency with AdvanceByBlock()
and because it still makes the code more clear.
This commit is contained in:
Vadim Zeitlin
2020-04-13 01:23:25 +02:00
parent bc3c6fea70
commit b8c3c60316
2 changed files with 55 additions and 14 deletions

View File

@@ -2771,7 +2771,10 @@ private:
const wxGridDirectionOperations& diroper);
bool DoMoveCursor(const wxKeyboardState& kbdState,
const wxGridDirectionOperations& diroper);
bool DoMoveCursorByPage(const wxGridDirectionOperations& diroper);
bool DoMoveCursorByPage(const wxKeyboardState& kbdState,
const wxGridDirectionOperations& diroper);
bool AdvanceByPage(wxGridCellCoords& coords,
const wxGridDirectionOperations& diroper);
bool DoMoveCursorByBlock(const wxKeyboardState& kbdState,
const wxGridDirectionOperations& diroper);
void AdvanceToNextNonEmpty(wxGridCellCoords& coords,