From c18b12458f1c1bc1d0e89d9adcc226724c3108b5 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 7 Jun 2008 02:09:03 +0000 Subject: [PATCH] don't refresh the current cell in SetCellHighlightROPenWidth() if it's invalid (#9523) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@54010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/grid.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 44f8b90f23..cdc6580cbc 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -9710,7 +9710,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);