Debugger: Automatically go into source view if we were in source view when we closed the debugger (when possible)
This commit is contained in:
parent
a18a3b7e95
commit
25e24e30b0
2 changed files with 13 additions and 0 deletions
|
@ -34,6 +34,7 @@ namespace Mesen.GUI.Config
|
|||
public ByteCodePosition ByteCodePosition = ByteCodePosition.Hidden;
|
||||
public PrgAddressPosition PrgAddressPosition = PrgAddressPosition.Hidden;
|
||||
public int TextZoom = 100;
|
||||
public bool UsingSourceView = false;
|
||||
}
|
||||
|
||||
public class DebugWorkspace
|
||||
|
|
|
@ -645,6 +645,14 @@ namespace Mesen.GUI.Debugger
|
|||
ResumeExecution();
|
||||
}
|
||||
_firstBreak = false;
|
||||
|
||||
//Switch to source viewer after reopening debugger if we were in source viewer when we closed it
|
||||
if(ctrlSourceViewer.CurrentFile != null && ConfigManager.Config.DebugInfo.LeftView.UsingSourceView) {
|
||||
ctrlDebuggerCode_OnSwitchView(this.ctrlDebuggerCode);
|
||||
}
|
||||
if(ctrlSourceViewerSplit.CurrentFile != null && ConfigManager.Config.DebugInfo.RightView.UsingSourceView) {
|
||||
ctrlDebuggerCode_OnSwitchView(this.ctrlDebuggerCodeSplit);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -961,6 +969,10 @@ namespace Mesen.GUI.Debugger
|
|||
ConfigManager.Config.DebugInfo.WindowHeight = this.WindowState != FormWindowState.Normal ? this.RestoreBounds.Height : this.Height;
|
||||
ConfigManager.Config.DebugInfo.TopPanelHeight = this.splitContainer.GetSplitterDistance();
|
||||
ConfigManager.Config.DebugInfo.LeftPanelWidth = this.ctrlSplitContainerTop.GetSplitterDistance();
|
||||
|
||||
ConfigManager.Config.DebugInfo.LeftView.UsingSourceView = this.ctrlSourceViewer.Visible;
|
||||
ConfigManager.Config.DebugInfo.RightView.UsingSourceView = this.ctrlSourceViewerSplit.Visible;
|
||||
|
||||
ConfigManager.ApplyChanges();
|
||||
|
||||
DebugWorkspaceManager.SaveWorkspace();
|
||||
|
|
Loading…
Add table
Reference in a new issue