Seek on right click in DisassemblyWidget

This commit is contained in:
Florian Märkl 2017-12-02 14:10:15 +01:00
parent 61549f401e
commit de010d4c6c
2 changed files with 11 additions and 0 deletions

View File

@ -535,6 +535,16 @@ void DisassemblyTextEdit::keyPressEvent(QKeyEvent */*event*/)
//QPlainTextEdit::keyPressEvent(event); //QPlainTextEdit::keyPressEvent(event);
} }
void DisassemblyTextEdit::mousePressEvent(QMouseEvent *event)
{
QPlainTextEdit::mousePressEvent(event);
if (event->button() == Qt::RightButton)
{
setTextCursor(cursorForPosition(event->pos()));
}
}
void DisassemblyWidget::seekPrev() void DisassemblyWidget::seekPrev()
{ {
Core()->seekPrev(); Core()->seekPrev();

View File

@ -93,6 +93,7 @@ protected:
bool viewportEvent(QEvent *event) override; bool viewportEvent(QEvent *event) override;
void scrollContentsBy(int dx, int dy) override; void scrollContentsBy(int dx, int dy) override;
void keyPressEvent(QKeyEvent *event) override; void keyPressEvent(QKeyEvent *event) override;
void mousePressEvent(QMouseEvent *event) override;
private: private:
bool lockScroll; bool lockScroll;