Add wxGridSelection::SelectAll() and use it in wxGrid
The difference between calling SelectAll() and SelectBlock() with a block covering the entire grid is that the former discards any previously selected blocks, which become clearly redundant. As a consequence, clicking on the grid corner 10 times in a row still results in a selection with a single block, not 10 (identical) blocks.
This commit is contained in:
@@ -10235,11 +10235,8 @@ void wxGrid::SelectBlock(int topRow, int leftCol, int bottomRow, int rightCol,
|
||||
|
||||
void wxGrid::SelectAll()
|
||||
{
|
||||
if ( m_numRows > 0 && m_numCols > 0 )
|
||||
{
|
||||
if ( m_selection )
|
||||
m_selection->SelectBlock( 0, 0, m_numRows - 1, m_numCols - 1 );
|
||||
}
|
||||
if ( m_selection )
|
||||
m_selection->SelectAll();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user