mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-31 00:35:05 +00:00
Fixes #84 by moving cursor to pointer position on right-click
This commit is contained in:
parent
ba8f60fe56
commit
8e9d152f46
@ -859,6 +859,10 @@ void MemoryWidget::showDisasContextMenu(const QPoint &pt)
|
||||
QMenu *menu = ui->disasTextEdit_2->createStandardContextMenu();
|
||||
QTextCursor cur = ui->disasTextEdit_2->textCursor();
|
||||
|
||||
// Move cursor to mouse position to get proper function data
|
||||
cur.setPosition(ui->disasTextEdit_2->cursorForPosition(pt).position(), QTextCursor::MoveAnchor);
|
||||
ui->disasTextEdit_2->setTextCursor(cur);
|
||||
|
||||
if (cur.hasSelection()) {
|
||||
menu->addSeparator();
|
||||
menu->addAction(ui->actionSend_to_Notepad);
|
||||
|
Loading…
Reference in New Issue
Block a user