X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6fc0f38fe07fc8c5ff5946f33e0015d3f438b920..02c6eadbc854eb841b75a57ec28f916abe381d03:/src/generic/grid.cpp diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 65a3603c05..2a8075f226 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -7665,7 +7665,17 @@ void wxGrid::SelectBlock( int topRow, int leftCol, int bottomRow, int rightCol ) { int temp; wxGridCellCoords updateTopLeft, updateBottomRight; - + + if ( m_selection->GetSelectionMode() == wxGrid::wxGridSelectRows ) + { + leftCol = 0; + rightCol = GetNumberCols() - 1; + } + else if ( m_selection->GetSelectionMode() == wxGrid::wxGridSelectColumns ) + { + topRow = 0; + bottomRow = GetNumberRows() - 1; + } if ( topRow > bottomRow ) { temp = topRow;