Hex Editor - dirty hack to prevent scrollbar value from being -1, why is it being -1 in the first place? meh

This commit is contained in:
adelikat 2014-09-13 13:50:29 +00:00
parent 1efaa896bc
commit de09aadc0e
1 changed files with 12 additions and 1 deletions

View File

@ -2216,9 +2216,20 @@ namespace BizHawk.Client.EmuHawk
}
}
bool _programmaticallyChangingValue = false;
private void HexScrollBar_ValueChanged(object sender, EventArgs e)
{
UpdateValues();
if (!_programmaticallyChangingValue)
{
if (HexScrollBar.Value < 0)
{
_programmaticallyChangingValue = true;
HexScrollBar.Value = 0;
_programmaticallyChangingValue = false;
}
UpdateValues();
}
}
protected override void OnShown(EventArgs e)