mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-21 04:16:12 +00:00
Add escape shortcut for DisassemblyWidget too
This commit is contained in:
parent
ca3efec644
commit
691d567c61
@ -100,6 +100,11 @@ DisassemblyWidget::DisassemblyWidget(QWidget *parent)
|
|||||||
connect(Core(), &CutterCore::refreshAll, this, [this]() {
|
connect(Core(), &CutterCore::refreshAll, this, [this]() {
|
||||||
refreshDisasm(Core()->getOffset());
|
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) :
|
DisassemblyWidget::DisassemblyWidget(const QString &title, QWidget *parent) :
|
||||||
@ -516,3 +521,8 @@ void DisassemblyTextEdit::keyPressEvent(QKeyEvent */*event*/)
|
|||||||
{
|
{
|
||||||
//QPlainTextEdit::keyPressEvent(event);
|
//QPlainTextEdit::keyPressEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DisassemblyWidget::seekPrev()
|
||||||
|
{
|
||||||
|
Core()->seekPrev();
|
||||||
|
}
|
||||||
|
@ -26,6 +26,7 @@ public slots:
|
|||||||
void refreshDisasm(RVA offset = RVA_INVALID);
|
void refreshDisasm(RVA offset = RVA_INVALID);
|
||||||
void fontsUpdatedSlot();
|
void fontsUpdatedSlot();
|
||||||
void colorsUpdatedSlot();
|
void colorsUpdatedSlot();
|
||||||
|
void seekPrev();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_seekChanged(RVA offset);
|
void on_seekChanged(RVA offset);
|
||||||
|
Loading…
Reference in New Issue
Block a user