From 92b0505c41e339e31eb4c0db55da9b35fa647db4 Mon Sep 17 00:00:00 2001 From: adelikat Date: Wed, 27 Nov 2019 20:35:05 -0600 Subject: [PATCH] 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) --- .../CustomControls/InputRoll/InputRoll.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.cs b/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.cs index 1f82023cef..0b50843a31 100644 --- a/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.cs +++ b/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.cs @@ -871,6 +871,7 @@ namespace BizHawk.Client.EmuHawk PointMouseToNewCell(); } + private bool _programmaticallyChangingRow = false; /// /// Scrolls so that the given index is visible, if it isn't already; doesn't use scroll settings. /// @@ -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); + } } } }