Use "uniqueCols" for an array containing column indices
No real changes, just don't use misleading "Rows" in the name of a variable containing column indices.
This commit is contained in:
@@ -769,7 +769,7 @@ wxArrayInt wxGridSelection::GetColSelection() const
|
|||||||
if ( m_selectionMode == wxGrid::wxGridSelectRows )
|
if ( m_selectionMode == wxGrid::wxGridSelectRows )
|
||||||
return wxArrayInt();
|
return wxArrayInt();
|
||||||
|
|
||||||
wxIntSortedArray uniqueRows(&CompareInts);
|
wxIntSortedArray uniqueCols(&CompareInts);
|
||||||
const size_t count = m_selection.size();
|
const size_t count = m_selection.size();
|
||||||
for ( size_t n = 0; n < count; ++n )
|
for ( size_t n = 0; n < count; ++n )
|
||||||
{
|
{
|
||||||
@@ -779,16 +779,16 @@ wxArrayInt wxGridSelection::GetColSelection() const
|
|||||||
{
|
{
|
||||||
for ( int c = block.GetLeftCol(); c <= block.GetRightCol(); ++c )
|
for ( int c = block.GetLeftCol(); c <= block.GetRightCol(); ++c )
|
||||||
{
|
{
|
||||||
uniqueRows.Add(c);
|
uniqueCols.Add(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wxArrayInt result;
|
wxArrayInt result;
|
||||||
result.reserve(uniqueRows.size());
|
result.reserve(uniqueCols.size());
|
||||||
for( size_t i = 0; i < uniqueRows.size(); ++i )
|
for( size_t i = 0; i < uniqueCols.size(); ++i )
|
||||||
{
|
{
|
||||||
result.push_back(uniqueRows[i]);
|
result.push_back(uniqueCols[i]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user