From 1f5b77bad3737ec4c3bcd5ce6a5f915c4746db7b Mon Sep 17 00:00:00 2001 From: Dimitri Schoolwerth Date: Tue, 19 Jan 2021 22:30:33 +0100 Subject: [PATCH] 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. --- src/generic/grid.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index cd06df1b72..2cf170caec 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -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;