From 025299ebd190d3a9bd09cf876d1161faebd11a99 Mon Sep 17 00:00:00 2001 From: adelikat Date: Tue, 23 Dec 2014 17:44:59 +0000 Subject: [PATCH] Debugger - Restart() logic --- .../tools/Debugger/GenericDebugger.IToolForm.cs | 3 ++- .../tools/Debugger/GenericDebugger.cs | 10 ++++++---- .../tools/Debugger/RegisterBoxControl.cs | 4 ++++ 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.IToolForm.cs b/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.IToolForm.cs index 58921774f2..b7a262f960 100644 --- a/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.IToolForm.cs +++ b/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.IToolForm.cs @@ -134,7 +134,8 @@ namespace BizHawk.Client.EmuHawk public void Restart() { - // TODO + DisengageDebugger(); + EngageDebugger(); } public bool AskSaveChanges() diff --git a/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.cs b/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.cs index afb99eb5eb..ec166ba345 100644 --- a/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.cs +++ b/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.cs @@ -28,15 +28,13 @@ namespace BizHawk.Client.EmuHawk private void GenericDebugger_Load(object sender, EventArgs e) { - SetDisassemblerItemCount(); EngageDebugger(); - UpdateDisassembler(); } - - private void EngageDebugger() { + DisassemblyLines.Clear(); + if (CanDisassemble) { try @@ -72,10 +70,14 @@ namespace BizHawk.Client.EmuHawk Text = Disassembler.Cpu }); } + + SetDisassemblerItemCount(); + UpdateDisassembler(); } else { DisassemblerBox.Enabled = false; + DisassemblerView.ItemCount = 0; DisassemblerBox.Controls.Add(new Label { Location = new Point(35, 23), diff --git a/BizHawk.Client.EmuHawk/tools/Debugger/RegisterBoxControl.cs b/BizHawk.Client.EmuHawk/tools/Debugger/RegisterBoxControl.cs index c4c8904a0a..1067937639 100644 --- a/BizHawk.Client.EmuHawk/tools/Debugger/RegisterBoxControl.cs +++ b/BizHawk.Client.EmuHawk/tools/Debugger/RegisterBoxControl.cs @@ -129,6 +129,8 @@ namespace BizHawk.Client.EmuHawk public void GenerateUI() { + this.SuspendLayout(); + this.Controls.Clear(); var canget = CanGetCpuRegisters; var canset = CanSetCpuRegisters; @@ -242,6 +244,8 @@ namespace BizHawk.Client.EmuHawk } this.Controls.Add(p); + + this.ResumeLayout(); } } }