Don't get the strings for hidden columns when painting the grid. Speeds up grid painting by up to 25%.

Originally committed to SVN as r6390.
This commit is contained in:
Thomas Goyne 2012-01-31 00:43:06 +00:00
parent b34d2c547f
commit cf1425f9d1
1 changed files with 1 additions and 1 deletions

View File

@ -452,7 +452,7 @@ void BaseGrid::OnPaint(wxPaintEvent &) {
wxRect updrect = region.GetRect();
int x = 0;
for (size_t i = 0; i < 11; ++i) {
if (updrect.x < x + colWidth[i] && updrect.x + updrect.width > x)
if (updrect.x < x + colWidth[i] && updrect.x + updrect.width > x && colWidth[i])
paint_columns[i] = true;
x += colWidth[i];
}