DeselectRow as we delete rows to avoid asserts

This commit is contained in:
Marek Roszko 2024-01-25 20:36:38 -05:00
parent 5d44e090dc
commit c2989132ac
1 changed files with 2 additions and 0 deletions

View File

@ -676,6 +676,8 @@ void DIALOG_LABEL_PROPERTIES::OnDeleteField( wxCommandEvent& event )
for( int row : selectedRows )
{
//avoids an assert if we deselect early here
m_grid->DeselectRow( row );
m_fields->erase( m_fields->begin() + row );
// notify the grid