Fix selections in HexEditor text columns

This commit is contained in:
Connor Olding 2015-12-23 21:29:48 -08:00
parent d470703a40
commit 9a45066e27
1 changed files with 4 additions and 3 deletions

View File

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