diff --git a/src/widgets/DisassemblyWidget.cpp b/src/widgets/DisassemblyWidget.cpp index 7fe1ffd7..f3a41735 100644 --- a/src/widgets/DisassemblyWidget.cpp +++ b/src/widgets/DisassemblyWidget.cpp @@ -535,6 +535,16 @@ void DisassemblyTextEdit::keyPressEvent(QKeyEvent */*event*/) //QPlainTextEdit::keyPressEvent(event); } +void DisassemblyTextEdit::mousePressEvent(QMouseEvent *event) +{ + QPlainTextEdit::mousePressEvent(event); + + if (event->button() == Qt::RightButton) + { + setTextCursor(cursorForPosition(event->pos())); + } +} + void DisassemblyWidget::seekPrev() { Core()->seekPrev(); diff --git a/src/widgets/DisassemblyWidget.h b/src/widgets/DisassemblyWidget.h index 2113ee6d..b3f8577d 100644 --- a/src/widgets/DisassemblyWidget.h +++ b/src/widgets/DisassemblyWidget.h @@ -93,6 +93,7 @@ protected: bool viewportEvent(QEvent *event) override; void scrollContentsBy(int dx, int dy) override; void keyPressEvent(QKeyEvent *event) override; + void mousePressEvent(QMouseEvent *event) override; private: bool lockScroll;