Edit Book: Preview panel: Add a copy selected text action to the context menu

This commit is contained in:
Kovid Goyal 2014-03-17 10:02:23 +05:30
parent a0d19d2f40
commit 5c2dec8022

View File

@ -416,6 +416,9 @@ class WebView(QWebView):
def contextMenuEvent(self, ev):
menu = QMenu(self)
ca = self.pageAction(QWebPage.Copy)
if ca.isEnabled():
menu.addAction(ca)
menu.addAction(actions['reload-preview'])
menu.addAction(QIcon(I('debug.png')), _('Inspect element'), self.inspect)
menu.exec_(ev.globalPos())