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:
parent
1efaa896bc
commit
de09aadc0e
|
@ -2216,9 +2216,20 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool _programmaticallyChangingValue = false;
|
||||||
private void HexScrollBar_ValueChanged(object sender, EventArgs e)
|
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)
|
protected override void OnShown(EventArgs e)
|
||||||
|
|
Loading…
Reference in New Issue