From 70e1d2bf3d396ad9a7fbe09d1d2230dea63579ae Mon Sep 17 00:00:00 2001 From: Ty Lamontagne Date: Sun, 20 Aug 2023 16:10:55 -0400 Subject: [PATCH] Debugger: Implement "Copy Address" context menu in memory view --- pcsx2-qt/Debugger/MemoryViewWidget.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pcsx2-qt/Debugger/MemoryViewWidget.cpp b/pcsx2-qt/Debugger/MemoryViewWidget.cpp index 4e6cc5a5c8..6200dceb17 100644 --- a/pcsx2-qt/Debugger/MemoryViewWidget.cpp +++ b/pcsx2-qt/Debugger/MemoryViewWidget.cpp @@ -377,7 +377,11 @@ void MemoryViewWidget::customMenuRequested(QPoint pos) { m_contextMenu = new QMenu(this); - QAction* action = new QAction(tr("Go to in disassembly")); + QAction* action = new QAction(tr("Copy Address")); + m_contextMenu->addAction(action); + connect(action, &QAction::triggered, this, [this]() { QApplication::clipboard()->setText(QString::number(m_table.selectedAddress, 16).toUpper()); }); + + action = new QAction(tr("Go to in disassembly")); m_contextMenu->addAction(action); connect(action, &QAction::triggered, this, [this]() { emit gotoInDisasm(m_table.selectedAddress); });