mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04: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
@ -561,7 +561,7 @@ class Editor(QMainWindow):
|
|||||||
m.addMenu(cm)
|
m.addMenu(cm)
|
||||||
if self.syntax == 'html':
|
if self.syntax == 'html':
|
||||||
m.addAction(actions['multisplit'])
|
m.addAction(actions['multisplit'])
|
||||||
m.exec_(self.editor.mapToGlobal(pos))
|
m.exec_(self.editor.viewport().mapToGlobal(pos))
|
||||||
|
|
||||||
def goto_sourceline(self, *args, **kwargs):
|
def goto_sourceline(self, *args, **kwargs):
|
||||||
return self.editor.goto_sourceline(*args, **kwargs)
|
return self.editor.goto_sourceline(*args, **kwargs)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user