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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user