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:
parent
b34d2c547f
commit
cf1425f9d1
1 changed files with 1 additions and 1 deletions
|
@ -452,7 +452,7 @@ void BaseGrid::OnPaint(wxPaintEvent &) {
|
||||||
wxRect updrect = region.GetRect();
|
wxRect updrect = region.GetRect();
|
||||||
int x = 0;
|
int x = 0;
|
||||||
for (size_t i = 0; i < 11; ++i) {
|
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;
|
paint_columns[i] = true;
|
||||||
x += colWidth[i];
|
x += colWidth[i];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue