mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
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:
commit
20e88f1f8e
@ -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'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user