From 9a45066e27f8c06280710e6c045866cb75b7925c Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Wed, 23 Dec 2015 21:29:48 -0800 Subject: [PATCH] Fix selections in HexEditor text columns --- BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.cs b/BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.cs index e91bb2770d..365b37c407 100644 --- a/BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.cs +++ b/BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.cs @@ -942,10 +942,11 @@ namespace BizHawk.Client.EmuHawk var column = x / (fontWidth * colWidth); - var start = GetTextOffset() - 50; + var innerOffset = AddressesLabel.Location.X - AddressLabel.Location.X + AddressesLabel.Margin.Left; + var start = GetTextOffset() - innerOffset; if (x > start) { - column = (x - start) / (fontWidth / DataSize); + column = (x - start) / (fontWidth * DataSize); } if (i >= 0 && i <= _maxRow && column >= 0 && column < (16 / DataSize)) @@ -1022,7 +1023,7 @@ namespace BizHawk.Client.EmuHawk { int start = (16 / DataSize) * fontWidth * (DataSize * 2 + 1); start += AddressesLabel.Location.X + fontWidth / 2; - start += fontWidth * 4; + start += fontWidth * 2; return start; }