GUI: Changed call stack context menu when called on space line
This commit is contained in:
parent
d39b8211de
commit
8f3119ecba
|
@ -28,11 +28,17 @@ void CallStackView::setupContextMenu()
|
|||
return DbgIsDebugging();
|
||||
});
|
||||
QIcon icon = DIcon(ArchValue("processor32.png", "processor64.png"));
|
||||
mMenuBuilder->addAction(makeAction(icon, tr("Follow &Address"), SLOT(followAddress())));
|
||||
mMenuBuilder->addAction(makeAction(icon, tr("Follow &To"), SLOT(followTo())));
|
||||
mMenuBuilder->addAction(makeAction(icon, tr("Follow &Address"), SLOT(followAddress())), [this](QMenu*)
|
||||
{
|
||||
return isSelectionValid();
|
||||
});
|
||||
mMenuBuilder->addAction(makeAction(icon, tr("Follow &To"), SLOT(followTo())), [this](QMenu*)
|
||||
{
|
||||
return isSelectionValid();
|
||||
});
|
||||
QAction* mFollowFrom = mMenuBuilder->addAction(makeAction(icon, tr("Follow &From"), SLOT(followFrom())), [this](QMenu*)
|
||||
{
|
||||
return !getCellContent(getInitialSelection(), ColFrom).isEmpty();
|
||||
return !getCellContent(getInitialSelection(), ColFrom).isEmpty() && isSelectionValid();
|
||||
});
|
||||
mFollowFrom->setShortcutContext(Qt::WidgetShortcut);
|
||||
mFollowFrom->setShortcut(QKeySequence("enter"));
|
||||
|
@ -176,3 +182,8 @@ void CallStackView::showSuspectedCallStack()
|
|||
updateCallStack();
|
||||
emit Bridge::getBridge()->updateDump();
|
||||
}
|
||||
|
||||
bool CallStackView::isSelectionValid()
|
||||
{
|
||||
return getCellContent(getInitialSelection(), ColThread).isEmpty();
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ private:
|
|||
};
|
||||
|
||||
MenuBuilder* mMenuBuilder;
|
||||
bool isSelectionValid();
|
||||
};
|
||||
|
||||
#endif // CALLSTACKVIEW_H
|
||||
|
|
Loading…
Reference in New Issue