don't refresh the current cell in SetCellHighlightROPenWidth() if it's invalid (#9523)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-06-07 02:09:03 +00:00
parent eddc468e25
commit 76c66f1953

View File

@@ -9633,7 +9633,8 @@ void wxGrid::SetCellHighlightROPenWidth(int width)
// make any visible change if the the thickness is getting smaller.
int row = m_currentCellCoords.GetRow();
int col = m_currentCellCoords.GetCol();
if ( GetColWidth(col) <= 0 || GetRowHeight(row) <= 0 )
if ( row == -1 || col == -1 ||
GetColWidth(col) <= 0 || GetRowHeight(row) <= 0 )
return;
wxRect rect = CellToRect(row, col);