Avoid refreshing a rect with a negative size
This commit is contained in:
parent
2ddfcc2b28
commit
d8b2fc1080
1 changed files with 10 additions and 4 deletions
|
|
@ -9905,8 +9905,11 @@ void wxGrid::DoSetRowSize( int row, int height )
|
|||
int cw, ch;
|
||||
GetClientSize(&cw, &ch);
|
||||
|
||||
const wxRect updateRect(0, y, cw, ch - y);
|
||||
Refresh(true, &updateRect);
|
||||
if (ch > y)
|
||||
{
|
||||
const wxRect updateRect(0, y, cw, ch - y);
|
||||
Refresh(true, &updateRect);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -10046,8 +10049,11 @@ void wxGrid::DoSetColSize( int col, int width )
|
|||
int cw, ch;
|
||||
GetClientSize(&cw, &ch);
|
||||
|
||||
const wxRect updateRect(x, 0, cw - x, ch);
|
||||
Refresh(true, &updateRect);
|
||||
if (cw > x)
|
||||
{
|
||||
const wxRect updateRect(x, 0, cw - x, ch);
|
||||
Refresh(true, &updateRect);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue