diff --git a/UI/Debugger/Controls/ctrlPanel.cs b/UI/Debugger/Controls/ctrlPanel.cs index 674a1c5..10245c2 100644 --- a/UI/Debugger/Controls/ctrlPanel.cs +++ b/UI/Debugger/Controls/ctrlPanel.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -17,6 +18,13 @@ namespace Mesen.GUI.Debugger.Controls 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) { if(Control.ModifierKeys != Keys.Control) {