Clear seleciton so wxWidgets doesn't go looking for deleted row.

This commit is contained in:
Jeff Young 2022-12-12 14:43:37 +00:00
parent ca5c0e2ac5
commit ccbbd2ddd9
1 changed files with 1 additions and 0 deletions

View File

@ -943,6 +943,7 @@ void DIALOG_SYMBOL_PROPERTIES::OnDeleteField( wxCommandEvent& event )
}
m_fieldsGrid->CommitPendingChanges( true /* quiet mode */ );
m_fieldsGrid->ClearSelection();
// Reverse sort so deleting a row doesn't change the indexes of the other rows.
selectedRows.Sort( []( int* first, int* second ) { return *second - *first; } );