From e3d85ffe35ffac253cdae5b08c50c33a17db9ce3 Mon Sep 17 00:00:00 2001 From: Sepalani Date: Wed, 17 Feb 2021 21:12:27 +0400 Subject: MemoryWidget: Add "Add to watch" action --- Source/Core/DolphinQt/Debugger/MemoryViewWidget.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Source/Core/DolphinQt/Debugger/MemoryViewWidget.cpp') diff --git a/Source/Core/DolphinQt/Debugger/MemoryViewWidget.cpp b/Source/Core/DolphinQt/Debugger/MemoryViewWidget.cpp index 60d32a8a25..5db9fdfbd9 100644 --- a/Source/Core/DolphinQt/Debugger/MemoryViewWidget.cpp +++ b/Source/Core/DolphinQt/Debugger/MemoryViewWidget.cpp @@ -403,6 +403,11 @@ void MemoryViewWidget::OnContextMenu() menu->addSeparator(); + menu->addAction(tr("Add to watch"), this, [this] { + const u32 address = GetContextAddress(); + const QString name = QStringLiteral("mem_%1").arg(address, 8, 16, QLatin1Char('0')); + emit RequestWatch(name, address); + }); menu->addAction(tr("Toggle Breakpoint"), this, &MemoryViewWidget::ToggleBreakpoint); menu->exec(QCursor::pos()); -- cgit v1.2.3