Tastudio - fix stackoverflow exception when drag scrolling (this didn't happen in earlier versions and they didn't have this kind of hack, there might be a better way to do this, but this seemed to work)

This commit is contained in:
adelikat 2019-11-27 20:35:05 -06:00
parent 0def3828b9
commit 92b0505c41
1 changed files with 7 additions and 1 deletions

View File

@ -871,6 +871,7 @@ namespace BizHawk.Client.EmuHawk
PointMouseToNewCell();
}
private bool _programmaticallyChangingRow = false;
/// <summary>
/// Scrolls so that the given index is visible, if it isn't already; doesn't use scroll settings.
/// </summary>
@ -878,6 +879,7 @@ namespace BizHawk.Client.EmuHawk
{
if (!IsVisible(index))
{
_programmaticallyChangingRow = true;
if (FirstVisibleRow > index)
{
FirstVisibleRow = index;
@ -951,7 +953,11 @@ namespace BizHawk.Client.EmuHawk
newCell.RowIndex = 0;
}
CellChanged(newCell);
if (!_programmaticallyChangingRow)
{
_programmaticallyChangingRow = false;
CellChanged(newCell);
}
}
}
}