Fix double enumeration in `InputRoll.SelectRow`

This commit is contained in:
James Groom 2024-03-26 01:11:07 +10:00 committed by GitHub
parent cb087a35fe
commit 7b5f688590
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 2 deletions

View File

@ -574,8 +574,7 @@ namespace BizHawk.Client.EmuHawk
}
else
{
IEnumerable<Cell> items = _selectedItems.Where(cell => cell.RowIndex == index);
_selectedItems.RemoveAll(items.Contains);
_selectedItems.RemoveAll(cell => cell.RowIndex == index);
_lastSelectedRow = _selectedItems.LastOrDefault()?.RowIndex;
}
}