Skip to content

Commit f8bef5c

Browse files
committed
Correct mouse click offset for PixelScale > 1
1 parent dcaf3e1 commit f8bef5c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Texture64/ImageForm.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ private void graphicsViewer_MouseUp(object sender, MouseEventArgs e)
630630
switch (e.Button)
631631
{
632632
case System.Windows.Forms.MouseButtons.Left:
633-
int pixelAmount = (e.X + e.Y * gv.Width) / gv.PixScale;
633+
int pixelAmount = (e.X + e.Y * gv.GetPixelWidth()) / gv.PixScale;
634634
advanceOffset(gv, 1, pixelAmount);
635635
break;
636636
case System.Windows.Forms.MouseButtons.Right:

0 commit comments

Comments
 (0)