don't call Refresh(empty-rect) unnecessarily
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59128 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -6191,13 +6191,13 @@ wxRect wxGrid::CellToRect( int row, int col ) const
|
|||||||
rect.width += GetColWidth(i);
|
rect.width += GetColWidth(i);
|
||||||
for (i=row; i < row + cell_rows; i++)
|
for (i=row; i < row + cell_rows; i++)
|
||||||
rect.height += GetRowHeight(i);
|
rect.height += GetRowHeight(i);
|
||||||
}
|
|
||||||
|
|
||||||
// if grid lines are enabled, then the area of the cell is a bit smaller
|
// if grid lines are enabled, then the area of the cell is a bit smaller
|
||||||
if (m_gridLinesEnabled)
|
if (m_gridLinesEnabled)
|
||||||
{
|
{
|
||||||
rect.width -= 1;
|
rect.width -= 1;
|
||||||
rect.height -= 1;
|
rect.height -= 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return rect;
|
return rect;
|
||||||
@@ -8201,8 +8201,10 @@ void wxGrid::ClearSelection()
|
|||||||
m_selectedBlockBottomRight =
|
m_selectedBlockBottomRight =
|
||||||
m_selectedBlockCorner = wxGridNoCellCoords;
|
m_selectedBlockCorner = wxGridNoCellCoords;
|
||||||
|
|
||||||
Refresh( false, &r1 );
|
if ( !r1.IsEmpty() )
|
||||||
Refresh( false, &r2 );
|
RefreshRect(r1, false);
|
||||||
|
if ( !r2.IsEmpty() )
|
||||||
|
RefreshRect(r2, false);
|
||||||
|
|
||||||
if ( m_selection )
|
if ( m_selection )
|
||||||
m_selection->ClearSelection();
|
m_selection->ClearSelection();
|
||||||
|
Reference in New Issue
Block a user