mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-08-19 10:52:23 +08:00
Ensure current cell remains valid when wxGrid table changes
Replacing the table used by the grid could make the current cell coordinates invalid, resulting in asserts when trying to use it later. Fix this by calling the same function which was already called when changing the existing table. See #23752. Closes #23751. Co-authored-by: Vadim Zeitlin <vadim@wxwidgets.org>
This commit is contained in:
committed by
Vadim Zeitlin
co-authored by
Vadim Zeitlin
parent
21f9366861
commit
e570d85164
@@ -2912,6 +2912,8 @@ wxGrid::SetTable(wxGridTableBase *table,
|
||||
|
||||
InvalidateBestSize();
|
||||
|
||||
UpdateCurrentCellOnRedim();
|
||||
|
||||
return m_created;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user