MemoryWidget: Add "Add to watch" action

This commit is contained in:
Sepalani committed 2021-02-17 21:32:36 +04:00
1 parent bbcaede389
commit e3d85ffe35
5 files changed
+9

No files matched your search

@@ -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());