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

@@ -1222,10 +1222,8 @@ void GridFrame::ShowSelection( wxCommandEvent& WXUNUSED(ev) )
{
int count = 0;
wxString desc;
const wxGridSelectionRange& sel = grid->GetSelectionRange();
for ( wxGridSelectionRange::iterator it = sel.begin();
it != sel.end();
++it, ++count )
const wxGridBlocks& sel = grid->GetSelectedBlocks();
for ( wxGridBlocks::iterator it = sel.begin(); it != sel.end(); ++it )
{
const wxGridBlockCoords& b = *it;
@@ -1264,7 +1262,7 @@ void GridFrame::ShowSelection( wxCommandEvent& WXUNUSED(ev) )
b.GetRightCol() + 1);
}
if ( count )
if ( count++ )
desc += "\n\t";
desc += blockDesc;
}