InputRoll - only attempt to remove selected items beyond rowcount if there are selected items past that count, this may fix the underlying issue in #1822

This commit is contained in:
adelikat 2020-04-24 16:41:08 -05:00
parent fc45ffa60e
commit d06ddc04e1
1 changed files with 6 additions and 1 deletions

View File

@ -269,7 +269,12 @@ namespace BizHawk.Client.EmuHawk
}
_rowCount = value;
_selectedItems.RemoveWhere(i => i.RowIndex >= _rowCount);
if (_selectedItems.Max(s => s.RowIndex) >= _rowCount)
{
_selectedItems.RemoveWhere(i => i.RowIndex >= _rowCount);
}
RecalculateScrollBars();
}