Merge pull request #8387 from sepalani/reg-view-in
RegisterWidget: Fix view in code/memory
This commit is contained in:
commit
a6daed23e7
|
@ -123,8 +123,10 @@ void RegisterWidget::ShowContextMenu()
|
||||||
// It's not related to timekeeping devices.
|
// It's not related to timekeeping devices.
|
||||||
menu->addAction(tr("Add to &watch"), this,
|
menu->addAction(tr("Add to &watch"), this,
|
||||||
[this, item] { emit RequestMemoryBreakpoint(item->GetValue()); });
|
[this, item] { emit RequestMemoryBreakpoint(item->GetValue()); });
|
||||||
menu->addAction(tr("View &memory"));
|
menu->addAction(tr("View &memory"), this,
|
||||||
menu->addAction(tr("View &code"));
|
[this, item] { emit RequestViewInMemory(item->GetValue()); });
|
||||||
|
menu->addAction(tr("View &code"), this,
|
||||||
|
[this, item] { emit RequestViewInCode(item->GetValue()); });
|
||||||
|
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,8 @@ public:
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void RequestTableUpdate();
|
void RequestTableUpdate();
|
||||||
|
void RequestViewInCode(u32 addr);
|
||||||
|
void RequestViewInMemory(u32 addr);
|
||||||
void RequestMemoryBreakpoint(u32 addr);
|
void RequestMemoryBreakpoint(u32 addr);
|
||||||
void UpdateTable();
|
void UpdateTable();
|
||||||
void UpdateValue(QTableWidgetItem* item);
|
void UpdateValue(QTableWidgetItem* item);
|
||||||
|
|
|
@ -394,6 +394,11 @@ void MainWindow::CreateComponents()
|
||||||
[this](u32 addr) { m_breakpoint_widget->AddAddressMBP(addr); });
|
[this](u32 addr) { m_breakpoint_widget->AddAddressMBP(addr); });
|
||||||
connect(m_register_widget, &RegisterWidget::RequestMemoryBreakpoint,
|
connect(m_register_widget, &RegisterWidget::RequestMemoryBreakpoint,
|
||||||
[this](u32 addr) { m_breakpoint_widget->AddAddressMBP(addr); });
|
[this](u32 addr) { m_breakpoint_widget->AddAddressMBP(addr); });
|
||||||
|
connect(m_register_widget, &RegisterWidget::RequestViewInMemory, m_memory_widget,
|
||||||
|
[this](u32 addr) { m_memory_widget->SetAddress(addr); });
|
||||||
|
connect(m_register_widget, &RegisterWidget::RequestViewInCode, m_code_widget, [this](u32 addr) {
|
||||||
|
m_code_widget->SetAddress(addr, CodeViewWidget::SetAddressUpdate::WithUpdate);
|
||||||
|
});
|
||||||
|
|
||||||
connect(m_code_widget, &CodeWidget::BreakpointsChanged, m_breakpoint_widget,
|
connect(m_code_widget, &CodeWidget::BreakpointsChanged, m_breakpoint_widget,
|
||||||
&BreakpointWidget::Update);
|
&BreakpointWidget::Update);
|
||||||
|
|
Loading…
Reference in New Issue