Fix inset context menu offset with keyboard (#12811)

This commit is contained in:
Juergen Spitzmueller 2023-07-03 16:28:38 +02:00
parent 94dd5ed6eb
commit d5a9699794

View File

@ -652,6 +652,10 @@ void GuiWorkArea::contextMenuEvent(QContextMenuEvent * e)
++pos.rx(); ++pos.rx();
} }
} }
if (e->reason() == QContextMenuEvent::Keyboard)
// Subtract the top margin
pos.setY(pos.y() - d->buffer_view_->topMargin());
name = d->buffer_view_->contextMenu(pos.x(), pos.y()); name = d->buffer_view_->contextMenu(pos.x(), pos.y());
} }