Make use of grid helper function GetCellSpan()

Also gets rid of an additional attribute lookup that was recently
added in 00c497125e containing a minimal fix.
This commit is contained in:
Dimitri Schoolwerth
2021-01-19 22:30:33 +01:00
parent 860d9d09bc
commit 1f5b77bad3

View File

@@ -6235,13 +6235,15 @@ void wxGrid::DrawGridCellArea( wxDC& dc, const wxGridCellCoordsArray& cells )
{
if (!m_table->IsEmptyCell(row + l, j))
{
wxGridCellAttrPtr attr = GetCellAttrPtr(row + l, j);
int numRows, numCols;
if ( GetCellSize(row + l, j, &numRows, &numCols)
attr->GetSize(&numRows, &numCols);
if ( GetCellSpan(numRows, numCols)
== wxGrid::CellSpan_Inside )
// As above: don't bother drawing inside cells.
continue;
if ( GetCellAttrPtr(row + l, j)->CanOverflow() )
if ( attr->CanOverflow() )
{
wxGridCellCoords cell(row + l, j);
bool marked = false;