From 7e0996b44b624b4d2c2fa8eb977287e496320da6 Mon Sep 17 00:00:00 2001 From: zeromus Date: Sun, 18 Oct 2015 22:13:41 -0500 Subject: [PATCH] fix Memory watch: Strange rectangle #526 --- .../tools/Watch/RamWatch.Designer.cs | 13 ++++++++++++- BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs | 3 +++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.Designer.cs b/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.Designer.cs index d018a85109..4155473411 100644 --- a/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.Designer.cs +++ b/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.Designer.cs @@ -33,6 +33,7 @@ this.WatchCountLabel = new System.Windows.Forms.Label(); this.MemDomainLabel = new System.Windows.Forms.Label(); this.ListViewContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components); + this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.EditContextMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.RemoveContextMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.DuplicateContextMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -144,6 +145,7 @@ // ListViewContextMenu // this.ListViewContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.newToolStripMenuItem, this.EditContextMenuItem, this.RemoveContextMenuItem, this.DuplicateContextMenuItem, @@ -159,9 +161,17 @@ this.MoveUpContextMenuItem, this.MoveDownContextMenuItem}); this.ListViewContextMenu.Name = "contextMenuStrip1"; - this.ListViewContextMenu.Size = new System.Drawing.Size(191, 280); + this.ListViewContextMenu.Size = new System.Drawing.Size(191, 324); this.ListViewContextMenu.Opening += new System.ComponentModel.CancelEventHandler(this.ListViewContextMenu_Opening); // + // newToolStripMenuItem + // + this.newToolStripMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.addWatch; + this.newToolStripMenuItem.Name = "newToolStripMenuItem"; + this.newToolStripMenuItem.Size = new System.Drawing.Size(190, 22); + this.newToolStripMenuItem.Text = "&New Watch"; + this.newToolStripMenuItem.Click += new System.EventHandler(this.NewWatchMenuItem_Click); + // // EditContextMenuItem // this.EditContextMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.CutHS; @@ -1041,5 +1051,6 @@ private System.Windows.Forms.ToolStripSeparator Separator4; private System.Windows.Forms.ToolStripMenuItem ReadBreakpointContextMenuItem; private System.Windows.Forms.ToolStripMenuItem WriteBreakpointContextMenuItem; + private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem; } } \ No newline at end of file diff --git a/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs b/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs index e2bc2003c9..5a870e5dd2 100644 --- a/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs +++ b/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs @@ -1086,6 +1086,8 @@ namespace BizHawk.Client.EmuHawk UnfreezeAllContextMenuItem.Visible = Global.CheatList.ActiveCount > 0; ViewInHexEditorContextMenuItem.Visible = SelectedWatches.Count() == 1; + + newToolStripMenuItem.Visible = indexes.Count == 0; } private void UnfreezeAllContextMenuItem_Click(object sender, EventArgs e) @@ -1213,5 +1215,6 @@ namespace BizHawk.Client.EmuHawk SelectedIndices.Any() && SelectedWatches.All(w => w.Domain.CanPoke()); } + } }