Avoid invalid update rectangles in wxGrid::BlockToDeviceRect(...)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Neis
2000-06-15 15:16:15 +00:00
parent 9be9d2f53d
commit c51147cf23

View File

@@ -8036,6 +8036,9 @@ wxRect wxGrid::BlockToDeviceRect( const wxGridCellCoords &topLeft,
int cw, ch;
m_gridWin->GetClientSize( &cw, &ch );
if (right < 0 || bottom < 0 || left > cw || top > ch)
return wxRect( 0, 0, 0, 0);
rect.SetLeft( wxMax(0, left) );
rect.SetTop( wxMax(0, top) );
rect.SetRight( wxMin(cw, right) );