Debugger: Prevent panel scroll position from resetting when clicking on the menu bar
This commit is contained in:
parent
161c68a875
commit
8af2f540ec
1 changed files with 8 additions and 0 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue