mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-10-23 08:29:47 +00:00
CheatSearchWidget: "Add to watch" to all selected items
Instead of just the right-clicked item.
This commit is contained in:
parent
8a97ce9124
commit
c002861041
1 changed files with 7 additions and 3 deletions
|
@ -498,9 +498,13 @@ void CheatSearchWidget::OnAddressTableContextMenu()
|
|||
menu->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
|
||||
menu->addAction(tr("Show in memory"), [this, address] { emit ShowMemory(address); });
|
||||
menu->addAction(tr("Add to watch"), this, [this, address] {
|
||||
const QString name = QStringLiteral("mem_%1").arg(address, 8, 16, QLatin1Char('0'));
|
||||
emit RequestWatch(name, address);
|
||||
menu->addAction(tr("Add to watch"), this, [this] {
|
||||
for (auto* const item : m_address_table->selectedItems())
|
||||
{
|
||||
const u32 address = item->data(ADDRESS_TABLE_ADDRESS_ROLE).toUInt();
|
||||
const QString name = QStringLiteral("mem_%1").arg(address, 8, 16, QLatin1Char('0'));
|
||||
emit RequestWatch(name, address);
|
||||
}
|
||||
});
|
||||
menu->addAction(tr("Generate Action Replay Code(s)"), this, &CheatSearchWidget::GenerateARCodes);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue