summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2021-02-14 16:30:05 +0100
committerGitHub <noreply@github.com>2021-02-14 16:30:05 +0100
commit6944eaa003743ef6dfaf52df362655d1e5b99592 (patch)
tree6fb6227e269fc3fb01a1b8fedc23a4a5edae2d60 /Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
parentc33d944961c3d6b16c512c25bf9ea01f0041c66a (diff)
parent5f629abd8b89971872b0c2c2cdc8ea0035e8998d (diff)
Merge pull request #9512 from sepalani/func-update
CodeViewWidget: Add WithDetailedUpdate to update CodeWidget
Diffstat (limited to 'Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp')
-rw-r--r--Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp b/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
index 1b0224f0c4..203b54450e 100644
--- a/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
+++ b/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
@@ -442,8 +442,19 @@ void CodeViewWidget::SetAddress(u32 address, SetAddressUpdate update)
return;
m_address = address;
- if (update == SetAddressUpdate::WithUpdate)
+ switch (update)
+ {
+ case SetAddressUpdate::WithoutUpdate:
+ return;
+ case SetAddressUpdate::WithUpdate:
+ // Update the CodeViewWidget
Update();
+ break;
+ case SetAddressUpdate::WithDetailedUpdate:
+ // Update the CodeWidget's views (code view, function calls/callers, ...)
+ emit UpdateCodeWidget();
+ break;
+ }
}
void CodeViewWidget::ReplaceAddress(u32 address, ReplaceWith replace)
@@ -611,7 +622,7 @@ void CodeViewWidget::OnFollowBranch()
if (!branch_addr)
return;
- SetAddress(branch_addr, SetAddressUpdate::WithUpdate);
+ SetAddress(branch_addr, SetAddressUpdate::WithDetailedUpdate);
}
void CodeViewWidget::OnRenameSymbol()
@@ -785,7 +796,7 @@ void CodeViewWidget::mousePressEvent(QMouseEvent* event)
if (column(item) == CODE_VIEW_COLUMN_BREAKPOINT)
ToggleBreakpoint();
else
- SetAddress(addr, SetAddressUpdate::WithUpdate);
+ SetAddress(addr, SetAddressUpdate::WithDetailedUpdate);
Update();
break;