Debugger: Hide "View in ... memory" option from right-click menu when it's not available
This commit is contained in:
parent
21aa1af8b0
commit
f5f844d796
1 changed files with 6 additions and 4 deletions
|
@ -202,13 +202,13 @@ namespace Mesen.GUI.Debugger.Controls
|
|||
CodeLabel label = (CodeLabel)item.SubItems[1].Tag;
|
||||
if(label.AddressType != AddressType.Register && label.AddressType != AddressType.InternalRam) {
|
||||
mnuViewInMemoryType.Text = "View in " + ResourceHelper.GetEnumText(label.AddressType);
|
||||
mnuViewInMemoryType.Enabled = true;
|
||||
mnuViewInMemoryType.Visible = true;
|
||||
} else {
|
||||
mnuViewInMemoryType.Enabled = false;
|
||||
mnuViewInMemoryType.Visible = false;
|
||||
}
|
||||
} else {
|
||||
mnuViewInCpuMemory.Enabled = false;
|
||||
mnuViewInMemoryType.Enabled = false;
|
||||
mnuViewInMemoryType.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -359,7 +359,9 @@ namespace Mesen.GUI.Debugger.Controls
|
|||
if(lstLabels.SelectedIndices.Count == 1) {
|
||||
ListViewItem item = GetSelectedItem();
|
||||
CodeLabel label = (CodeLabel)item.SubItems[1].Tag;
|
||||
DebugWindowManager.OpenMemoryViewer((int)label.Address, label.AddressType.ToMemoryType());
|
||||
if(label.AddressType != AddressType.Register && label.AddressType != AddressType.InternalRam) {
|
||||
DebugWindowManager.OpenMemoryViewer((int)label.Address, label.AddressType.ToMemoryType());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue