From a65c0c29ace1947f337e359f324ba1700eb3fbfe Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 18 Sep 2019 18:05:55 +0200 Subject: [PATCH] Fix row/column confusion in UpdateCurrentCellOnRedim() This function, just added in dda6aa6bdc8e30ba3a1feefa9aba3ce6fec076e8, inverted row and column arguments of SetCurrentCell(), resulting in assert failures when the grid size changed. See https://github.com/wxWidgets/wxWidgets/pull/1546 --- src/generic/grid.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index e25a2ea050..1892d53292 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -3614,7 +3614,7 @@ void wxGrid::UpdateCurrentCellOnRedim() col = m_numCols - 1; if (row >= m_numRows) row = m_numRows - 1; - SetCurrentCell(col, row); + SetCurrentCell(row, col); } } }