Stop passing invalid coordinates to ExtendOrCreateCurrentBlock()
This made the logic of this function unnecessarily more complicated. Instead, just fall back to the current cell coordinates in the only place where this could happen before. Doing this still preserves the correct behaviour of Shift-arrow selection when entire rows/columns are selected and the current cell is not the leftmost/topmost cell (due to scrolling), but the code is simpler. Remove the now always true condition check and assert that it's indeed always true. Note that the changes to gridsel.cpp in this commit are best viewed ignoring whitespace changes.
This commit is contained in:
@@ -73,9 +73,10 @@ public:
|
||||
// wxGrid::m_currentCellCoords (the exception is when we scrolled out from
|
||||
// the top of the grid and select a column or scrolled right and select
|
||||
// a row: in this case the lowest visible row/column will be set as
|
||||
// current, not the first one). If the row or the column component of
|
||||
// blockEnd parameter has value of -1, it means that the corresponding
|
||||
// component of the current block should not be changed.
|
||||
// current, not the first one).
|
||||
//
|
||||
// Both components of both blockStart and blockEnd must be valid.
|
||||
//
|
||||
// Return true if the current block was actually changed or created.
|
||||
bool ExtendOrCreateCurrentBlock(const wxGridCellCoords& blockStart,
|
||||
const wxGridCellCoords& blockEnd,
|
||||
|
Reference in New Issue
Block a user