Only jump to reference when double-clicking with left mouse button. (#3174)

This commit is contained in:
Lucas Hosseini 2023-05-09 03:48:09 +02:00 committed by GitHub
parent 8c89dfde8b
commit 882f340481
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -623,10 +623,12 @@ bool DisassemblyWidget::eventFilter(QObject *obj, QEvent *event)
&& (obj == mDisasTextEdit || obj == mDisasTextEdit->viewport())) {
QMouseEvent *mouseEvent = static_cast<QMouseEvent *>(event);
const QTextCursor &cursor = mDisasTextEdit->cursorForPosition(mouseEvent->pos());
jumpToOffsetUnderCursor(cursor);
if (mouseEvent->button() == Qt::LeftButton) {
const QTextCursor &cursor = mDisasTextEdit->cursorForPosition(mouseEvent->pos());
jumpToOffsetUnderCursor(cursor);
return true;
return true;
}
} else if (Config()->getPreviewValue()
&& event->type() == QEvent::ToolTip
&& obj == mDisasTextEdit->viewport()) {