Add escape shortcut for DisassemblyWidget too

This commit is contained in:
xarkes 2017-11-28 16:42:40 +01:00
parent ca3efec644
commit 691d567c61
2 changed files with 11 additions and 0 deletions

View File

@ -100,6 +100,11 @@ DisassemblyWidget::DisassemblyWidget(QWidget *parent)
connect(Core(), &CutterCore::refreshAll, this, [this]() {
refreshDisasm(Core()->getOffset());
});
// Dirty
QShortcut *shortcut_escape = new QShortcut(QKeySequence(Qt::Key_Escape), this);
shortcut_escape->setContext(Qt::WidgetShortcut);
connect(shortcut_escape, SIGNAL(activated()), this, SLOT(seekPrev()));
}
DisassemblyWidget::DisassemblyWidget(const QString &title, QWidget *parent) :
@ -516,3 +521,8 @@ void DisassemblyTextEdit::keyPressEvent(QKeyEvent */*event*/)
{
//QPlainTextEdit::keyPressEvent(event);
}
void DisassemblyWidget::seekPrev()
{
Core()->seekPrev();
}

View File

@ -26,6 +26,7 @@ public slots:
void refreshDisasm(RVA offset = RVA_INVALID);
void fontsUpdatedSlot();
void colorsUpdatedSlot();
void seekPrev();
private slots:
void on_seekChanged(RVA offset);