This commit is contained in:
alyosha-tas 2019-04-21 15:29:22 -04:00
commit 1e4a0da15e
2 changed files with 17 additions and 18 deletions

View File

@ -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;

View File

@ -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
}
}
}