1
0
Fork 0

Set the follow in disassembler shortcut in graph to G

This commit is contained in:
torusrxxx 2020-12-29 22:05:46 +08:00
parent 9fe6a9c164
commit 382d452ec0
No known key found for this signature in database
GPG Key ID: A795C73A0F1CFADD
2 changed files with 11 additions and 6 deletions

View File

@ -2179,20 +2179,19 @@ void DisassemblerGraphView::setupContextMenu()
{ {
return DbgIsDebugging() && this->ready; return DbgIsDebugging() && this->ready;
}); });
mMenuBuilder->addSeparator();
mCommonActions = new CommonActions(this, getActionHelperFuncs(), [this]() mCommonActions = new CommonActions(this, getActionHelperFuncs(), [this]()
{ {
return zoomActionHelper(); return zoomActionHelper();
}); });
mCommonActions->build(mMenuBuilder, CommonActions::ActionBreakpoint | CommonActions::ActionMemoryMap | CommonActions::ActionBookmark | CommonActions::ActionLabel |
CommonActions::ActionComment | CommonActions::ActionDisasm | CommonActions::ActionNewOrigin | CommonActions::ActionNewThread);
auto zoomActionHelperNonZero = [this](QMenu*) auto zoomActionHelperNonZero = [this](QMenu*)
{ {
return zoomActionHelper() != 0; return zoomActionHelper() != 0;
}; };
mMenuBuilder->addAction(makeShortcutAction(DIcon(ArchValue("processor32.png", "processor64.png")), tr("Follow in &Disassembler"), SLOT(followDisassemblySlot()), "ActionGraph"), zoomActionHelperNonZero);
mMenuBuilder->addSeparator();
mCommonActions->build(mMenuBuilder, CommonActions::ActionBreakpoint | CommonActions::ActionMemoryMap | CommonActions::ActionBookmark | CommonActions::ActionLabel |
CommonActions::ActionComment | CommonActions::ActionNewOrigin | CommonActions::ActionNewThread);
mMenuBuilder->addAction(makeShortcutAction(DIcon("xrefs.png"), tr("Xrefs..."), SLOT(xrefSlot()), "ActionXrefs"), zoomActionHelperNonZero); mMenuBuilder->addAction(makeShortcutAction(DIcon("xrefs.png"), tr("Xrefs..."), SLOT(xrefSlot()), "ActionXrefs"), zoomActionHelperNonZero);
@ -2523,6 +2522,11 @@ void DisassemblerGraphView::xrefSlot()
mXrefDlg->showNormal(); mXrefDlg->showNormal();
} }
void DisassemblerGraphView::followDisassemblySlot()
{
mCommonActions->followDisassemblySlot();
}
void DisassemblerGraphView::followActionSlot() void DisassemblerGraphView::followActionSlot()
{ {
QAction* action = qobject_cast<QAction*>(sender()); QAction* action = qobject_cast<QAction*>(sender());

View File

@ -281,6 +281,7 @@ public slots:
void gotoNextSlot(); void gotoNextSlot();
void toggleSyncOriginSlot(); void toggleSyncOriginSlot();
void followActionSlot(); void followActionSlot();
void followDisassemblySlot();
void refreshSlot(); void refreshSlot();
void saveImageSlot(); void saveImageSlot();
void xrefSlot(); void xrefSlot();