Debugger: Memory Tools - Fixed "Go To" on access counter tab

This commit is contained in:
Sour 2019-01-13 14:55:00 -05:00
parent cab24bbd70
commit 97fb853d66
3 changed files with 17 additions and 7 deletions

View file

@ -179,6 +179,11 @@ namespace Mesen.GUI.Debugger.Controls
RefreshData();
}
public void GoToAddress()
{
ctrlScrollableTextbox.GoToAddress();
}
private enum SortType
{
Address = 0,

View file

@ -540,12 +540,13 @@ namespace Mesen.GUI.Debugger
address.Address = (UInt32)currentAddr;
frmGoToLine frm = new frmGoToLine(address, 4);
frm.StartPosition = FormStartPosition.Manual;
Point topLeft = this.PointToScreen(new Point(0, 0));
frm.Location = new Point(topLeft.X + (this.Width - frm.Width) / 2, topLeft.Y + (this.Height - frm.Height) / 2);
if(frm.ShowDialog() == DialogResult.OK) {
this.ctrlTextbox.ScrollToLineNumber((int)address.Address);
using(frmGoToLine frm = new frmGoToLine(address, 4)) {
frm.StartPosition = FormStartPosition.Manual;
Point topLeft = this.PointToScreen(new Point(0, 0));
frm.Location = new Point(topLeft.X + (this.Width - frm.Width) / 2, topLeft.Y + (this.Height - frm.Height) / 2);
if(frm.ShowDialog() == DialogResult.OK) {
this.ctrlTextbox.ScrollToLineNumber((int)address.Address);
}
}
}

View file

@ -388,7 +388,11 @@ namespace Mesen.GUI.Debugger
private void mnuGoTo_Click(object sender, EventArgs e)
{
this.ctrlHexViewer.GoToAddress();
if(_selectedTab == tpgMemoryViewer) {
this.ctrlHexViewer.GoToAddress();
} else if(_selectedTab == tpgAccessCounters) {
this.ctrlMemoryAccessCounters.GoToAddress();
}
}
private void mnuGoToAll_Click(object sender, EventArgs e)