Fix #1869515 [Right click in the Quickview causes python error](https://bugs.launchpad.net/calibre/+bug/1869515)

Merge branch 'master' of https://github.com/cbhaley/calibre
This commit is contained in:
Kovid Goyal 2020-03-29 08:14:40 +05:30
commit 20e88f1f8e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -273,6 +273,8 @@ class Quickview(QDialog, Ui_Quickview):
def show_context_menu(self, point): def show_context_menu(self, point):
index = self.books_table.indexAt(point) index = self.books_table.indexAt(point)
item = self.books_table.item(index.row(), 0) item = self.books_table.item(index.row(), 0)
if item is None:
return False;
book_id = int(item.data(Qt.UserRole)) book_id = int(item.data(Qt.UserRole))
self.context_menu = QMenu(self) self.context_menu = QMenu(self)
self.context_menu.addAction(self.view_icon, _('View'), self.context_menu.addAction(self.view_icon, _('View'),