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:
parent
0def3828b9
commit
92b0505c41
|
@ -871,6 +871,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
PointMouseToNewCell();
|
PointMouseToNewCell();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool _programmaticallyChangingRow = false;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Scrolls so that the given index is visible, if it isn't already; doesn't use scroll settings.
|
/// Scrolls so that the given index is visible, if it isn't already; doesn't use scroll settings.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -878,6 +879,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
if (!IsVisible(index))
|
if (!IsVisible(index))
|
||||||
{
|
{
|
||||||
|
_programmaticallyChangingRow = true;
|
||||||
if (FirstVisibleRow > index)
|
if (FirstVisibleRow > index)
|
||||||
{
|
{
|
||||||
FirstVisibleRow = index;
|
FirstVisibleRow = index;
|
||||||
|
@ -951,7 +953,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
newCell.RowIndex = 0;
|
newCell.RowIndex = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
CellChanged(newCell);
|
if (!_programmaticallyChangingRow)
|
||||||
|
{
|
||||||
|
_programmaticallyChangingRow = false;
|
||||||
|
CellChanged(newCell);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue