summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Debugger/CodeWindow.cpp
diff options
context:
space:
mode:
authorAnthony <Helios747@users.noreply.github.com>2016-10-29 00:16:09 -0500
committerGitHub <noreply@github.com>2016-10-29 00:16:09 -0500
commit26902d89e89de46d43adf11a194ea1ef84b9f4da (patch)
tree75cbd75513e55300bd5f1c14e41cab6be46c7bb3 /Source/Core/DolphinWX/Debugger/CodeWindow.cpp
parent476cf3803d6e276d67cdbc016c28cd1a51e2fd88 (diff)
parent63546b4f2e6ca7926e6649c551c654e15e06b0cd (diff)
Merge pull request #4377 from aldelaro5/fix-centerPc-on-toggleBreakpoint
Fix unnecessary Center PC calls in the CodeWindow
Diffstat (limited to 'Source/Core/DolphinWX/Debugger/CodeWindow.cpp')
-rw-r--r--Source/Core/DolphinWX/Debugger/CodeWindow.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/Source/Core/DolphinWX/Debugger/CodeWindow.cpp b/Source/Core/DolphinWX/Debugger/CodeWindow.cpp
index 388160f384..9cf243456d 100644
--- a/Source/Core/DolphinWX/Debugger/CodeWindow.cpp
+++ b/Source/Core/DolphinWX/Debugger/CodeWindow.cpp
@@ -159,7 +159,8 @@ void CCodeWindow::OnHostMessage(wxCommandEvent& event)
break;
case IDM_UPDATE_DISASM_DIALOG:
- Repopulate();
+ codeview->Center(PC);
+ Repopulate(false);
if (HasPanel<CRegisterWindow>())
GetPanel<CRegisterWindow>()->NotifyUpdate();
if (HasPanel<CWatchWindow>())
@@ -205,12 +206,14 @@ void CCodeWindow::OnCodeStep(wxCommandEvent& event)
case IDM_SKIP:
PC += 4;
- Repopulate();
+ codeview->Center(PC);
+ Repopulate(false);
break;
case IDM_SETPC:
PC = codeview->GetSelection();
- Repopulate();
+ codeview->Center(PC);
+ Repopulate(false);
break;
case IDM_GOTOPC:
@@ -383,11 +386,8 @@ void CCodeWindow::StepOut()
PowerPC::SetMode(old_mode);
CPU::PauseAndLock(false, false);
- JumpToAddress(PC);
- {
- wxCommandEvent ev(wxEVT_HOST_COMMAND, IDM_UPDATE_DISASM_DIALOG);
- GetEventHandler()->ProcessEvent(ev);
- }
+ wxCommandEvent ev(wxEVT_HOST_COMMAND, IDM_UPDATE_DISASM_DIALOG);
+ GetEventHandler()->ProcessEvent(ev);
// Update all toolbars in the aui manager
Parent->UpdateGUI();
@@ -605,12 +605,13 @@ void CCodeWindow::PopulateToolbar(wxToolBar* toolBar)
}
// Update GUI
-void CCodeWindow::Repopulate()
+void CCodeWindow::Repopulate(bool refresh_codeview)
{
if (!codeview)
return;
- codeview->Center(PC);
+ if (refresh_codeview)
+ codeview->Refresh();
UpdateCallstack();
UpdateButtonStates();