From f599b33ee2c7c639a3f9dffbf5799838929610d8 Mon Sep 17 00:00:00 2001 From: James Groom Date: Sun, 21 Apr 2019 14:24:58 +0000 Subject: [PATCH 1/2] Don't change cell selection while context menu is open (resolves #1551) --- BizHawk.Client.EmuHawk/CustomControls/InputRoll.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BizHawk.Client.EmuHawk/CustomControls/InputRoll.cs b/BizHawk.Client.EmuHawk/CustomControls/InputRoll.cs index e85de140a0..3cd63c326b 100644 --- a/BizHawk.Client.EmuHawk/CustomControls/InputRoll.cs +++ b/BizHawk.Client.EmuHawk/CustomControls/InputRoll.cs @@ -1196,7 +1196,7 @@ namespace BizHawk.Client.EmuHawk if (AllowRightClickSelecton && e.Button == MouseButtons.Right) { - if (!IsHoveringOnColumnCell) + if (!IsHoveringOnColumnCell && CurrentCell != null) { _currentX = e.X; _currentY = e.Y; From 2bb63c2bf10fc59e9298ad9e3ed4cc8f0ef8070c Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Mon, 22 Apr 2019 01:09:18 +1000 Subject: [PATCH 2/2] Fix go to address UX in RAM Search --- .../tools/Watch/RamSearch.cs | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/Watch/RamSearch.cs b/BizHawk.Client.EmuHawk/tools/Watch/RamSearch.cs index afe14a1f66..11adfdccb6 100644 --- a/BizHawk.Client.EmuHawk/tools/Watch/RamSearch.cs +++ b/BizHawk.Client.EmuHawk/tools/Watch/RamSearch.cs @@ -927,32 +927,31 @@ namespace BizHawk.Client.EmuHawk Message = "Enter a hexadecimal value" }; - var result = prompt.ShowHawkDialog(); - - if (result == DialogResult.OK) + while (prompt.ShowHawkDialog() == DialogResult.OK) { - if (prompt.PromptText.IsHex()) + try { - int addr; - try - { - addr = int.Parse(prompt.PromptText, NumberStyles.HexNumber); - } - catch (OverflowException e) - { - //TODO repeat dialog `prompt` / show error? - return; - } - + var addr = int.Parse(prompt.PromptText, NumberStyles.HexNumber); for (int index = 0; index < _searches.Count; index++) { - if (addr == _searches[index].Address) + if (_searches[index].Address == addr) { WatchListView.SelectItem(index, true); WatchListView.ensureVisible(); - break; + return; // Don't re-show dialog on success } } + //TODO add error text to dialog? + // Re-show dialog if the address isn't found + } + catch (FormatException e) + { + // Re-show dialog if given invalid text (shouldn't happen) + } + catch (OverflowException e) + { + //TODO add error text to dialog? + // Re-show dialog if the address isn't valid } } }