mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix bug #1869515: right-clicking in empty space in Quickview raises an exception.
This commit is contained in:
parent
2cd43e0fcd
commit
e278f721ab
@ -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