Fix adding blocks to existing selection in wxGrid by Ctrl-drag.

Allow using Ctrl-dragging to add more blocks to the existing selection,
similarly to how spreadsheets work.

Closes #14141.
This commit is contained in:
Knut Petter Lehre
2015-05-09 18:03:06 +02:00
committed by Vadim Zeitlin
parent 7c108690e5
commit d1f3be5846
2 changed files with 4 additions and 1 deletions

View File

@@ -585,6 +585,7 @@ Unix:
All (GUI):
- Fix hang when deleting columns from wxTreeListCtrl.
- Allow using Ctrl-dragging to add to selection in wxGrid (Knut Petter Lehre).
- Fix several floating point rounding bugs in wxPropertyGrid (Artur Wieczorek).
- Restore support for wxFD_OVERWRITE_PROMPT and wxFD_FILE_MUST_EXIST in
wxGenericFileDialog which was accidentally lost some time ago (Carl Godkin).

View File

@@ -3953,7 +3953,9 @@ wxGrid::DoGridCellDrag(wxMouseEvent& event,
case wxMOD_CONTROL:
if ( m_selectedBlockCorner == wxGridNoCellCoords)
m_selectedBlockCorner = coords;
UpdateBlockBeingSelected(m_selectedBlockCorner, coords);
if ( isFirstDrag )
SetGridCursor(coords);
UpdateBlockBeingSelected(m_currentCellCoords, coords);
break;
case wxMOD_NONE: