Hex Editor - issue #481 - keep scroll bar position when resetting the current rom as opposed to changing to a new one
This commit is contained in:
parent
7edd746f68
commit
674b9b4c07
|
@ -136,6 +136,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string _lastRom = string.Empty;
|
||||||
|
|
||||||
public void Restart()
|
public void Restart()
|
||||||
{
|
{
|
||||||
_rom = GetRomBytes();
|
_rom = GetRomBytes();
|
||||||
|
@ -157,7 +159,13 @@ namespace BizHawk.Client.EmuHawk
|
||||||
BigEndian = _domain.EndianType == MemoryDomain.Endian.Big;
|
BigEndian = _domain.EndianType == MemoryDomain.Endian.Big;
|
||||||
_maxRow = _domain.Size / 2;
|
_maxRow = _domain.Size / 2;
|
||||||
|
|
||||||
ResetScrollBar();
|
// Don't reset scroll bar if restarting the same rom
|
||||||
|
if (_lastRom != GlobalWin.MainForm.CurrentlyOpenRom)
|
||||||
|
{
|
||||||
|
_lastRom = GlobalWin.MainForm.CurrentlyOpenRom;
|
||||||
|
ResetScrollBar();
|
||||||
|
}
|
||||||
|
|
||||||
SetDataSize(DataSize);
|
SetDataSize(DataSize);
|
||||||
UpdateValues();
|
UpdateValues();
|
||||||
AddressLabel.Text = GenerateAddressString();
|
AddressLabel.Text = GenerateAddressString();
|
||||||
|
|
Loading…
Reference in New Issue