Rename wxGrid::GetSelectionRange() to GetSelectedBlocks()

This seems to be more consistent with the existing functions and doesn't
create ambiguity with a grid range.

Also rename wxGridSelectionRange to just wxGridBlocks as, in principle,
this class could be used for iterating over any blocks, not just the
selected ones.

No changes in functionality, this is just a renaming.
This commit is contained in:
Vadim Zeitlin
2020-04-12 02:36:52 +02:00
parent b10755e553
commit 30eaa28de5
5 changed files with 27 additions and 29 deletions

View File

@@ -10284,13 +10284,13 @@ bool wxGrid::IsInSelection( int row, int col ) const
return m_selection && m_selection->IsInSelection(row, col);
}
wxGridSelectionRange wxGrid::GetSelectionRange() const
wxGridBlocks wxGrid::GetSelectedBlocks() const
{
if ( !m_selection )
return wxGridSelectionRange();
return wxGridBlocks();
const wxVectorGridBlockCoords& blocks = m_selection->GetBlocks();
return wxGridSelectionRange(blocks.begin(), blocks.end());
return wxGridBlocks(blocks.begin(), blocks.end());
}
wxGridCellCoordsArray wxGrid::GetSelectedCells() const