mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-26 23:46:03 +01:00
Edit Book: Fix context menu positioning in code editor
There was a slight offset in the positioning caused by calculating the position w.r.t. to the widget instead of the viewport.
This commit is contained in:
parent
316201354c
commit
a7ae71e41f
1 changed files with 1 additions and 1 deletions
|
|
@ -561,7 +561,7 @@ def show_context_menu(self, pos):
|
|||
m.addMenu(cm)
|
||||
if self.syntax == 'html':
|
||||
m.addAction(actions['multisplit'])
|
||||
m.exec_(self.editor.mapToGlobal(pos))
|
||||
m.exec_(self.editor.viewport().mapToGlobal(pos))
|
||||
|
||||
def goto_sourceline(self, *args, **kwargs):
|
||||
return self.editor.goto_sourceline(*args, **kwargs)
|
||||
|
|
|
|||
Loading…
Reference in a new issue