From 5c2dec8022a1e11bae1c4de89509139da795675c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 17 Mar 2014 10:02:23 +0530 Subject: [PATCH] Edit Book: Preview panel: Add a copy selected text action to the context menu --- src/calibre/gui2/tweak_book/preview.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/gui2/tweak_book/preview.py b/src/calibre/gui2/tweak_book/preview.py index 7c12c35292..fc986bbc87 100644 --- a/src/calibre/gui2/tweak_book/preview.py +++ b/src/calibre/gui2/tweak_book/preview.py @@ -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())