Fix code determining the rows to refresh in wxGrid::SetColSize()
The changes in 15de1a4cf4
(Optimize refresh when resizing grid rows or
columns, 2020-02-18) incorrectly translated XToPos() used in
SetRowSize() to YToRow(), which compiled due to an implicit conversion
of m_gridWin pointer to bool, but did the wrong thing, as the wrong grid
window could be used for a frozen grid.
Fix this by switching to internalYToRow() which actually does what the
original code tried to do.
Co-authored-by: Artur Wieczorek <artwik@wp.pl>
This commit is contained in:
@@ -9869,8 +9869,8 @@ void wxGrid::DoSetColSize( int col, int width )
|
||||
CalcUnscrolledPosition(0, rect.GetTop(), NULL, &top);
|
||||
CalcUnscrolledPosition(0, rect.GetBottom(), NULL, &bottom);
|
||||
|
||||
const int rowTop = YToRow(top, m_gridWin);
|
||||
const int rowBottom = YToRow(bottom, m_gridWin);
|
||||
const int rowTop = internalYToRow(top, m_gridWin);
|
||||
const int rowBottom = internalYToRow(bottom, m_gridWin);
|
||||
for ( int row = rowTop; row <= rowBottom; ++row )
|
||||
{
|
||||
int numRows, numCols;
|
||||
|
Reference in New Issue
Block a user