Debugger: Fixed breakpoint address when clicking on margin to set a breakpoint on the last visible line

This commit is contained in:
Souryo 2016-11-14 22:37:56 -05:00
parent 5899427fa5
commit cc93ab470d

View file

@ -436,10 +436,10 @@ namespace Mesen.GUI.Debugger
protected override void OnMouseDown(MouseEventArgs e) protected override void OnMouseDown(MouseEventArgs e)
{ {
base.OnMouseDown(e);
this.Focus(); this.Focus();
int clickedLine = this.GetLineAtPosition(e.Y); int clickedLine = this.GetLineAtPosition(e.Y);
this.CursorPosition = this.ScrollPosition + clickedLine; this.CursorPosition = this.ScrollPosition + clickedLine;
base.OnMouseDown(e);
} }
private void DrawLine(Graphics g, int currentLine, int marginLeft, int positionY) private void DrawLine(Graphics g, int currentLine, int marginLeft, int positionY)