Debugger: Prevent panel scroll position from resetting when clicking on the menu bar

This commit is contained in:
Sour 2019-05-02 20:27:11 -04:00
parent 161c68a875
commit 8af2f540ec

View file

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -17,6 +18,13 @@ namespace Mesen.GUI.Debugger.Controls
this.DoubleBuffered = true; this.DoubleBuffered = true;
} }
protected override Point ScrollToControl(Control activeControl)
{
// Returning the current location prevents the panel from
// scrolling to the active control when the panel loses and regains focus
return this.DisplayRectangle.Location;
}
protected override void OnMouseWheel(MouseEventArgs e) protected override void OnMouseWheel(MouseEventArgs e)
{ {
if(Control.ModifierKeys != Keys.Control) { if(Control.ModifierKeys != Keys.Control) {