mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix traceback when clicking in empty part of rules list
This commit is contained in:
parent
07c75c21c2
commit
37ad5d3eb9
@ -100,6 +100,8 @@ class TbIconRulesTab(ConfigTabWidget, Ui_Form):
|
||||
|
||||
def show_context_menu(self, point):
|
||||
clicked_item = self.rules_table.itemAt(point)
|
||||
if clicked_item is None:
|
||||
return
|
||||
item = self.rules_table.item(clicked_item.row(), CATEGORY_COLUMN)
|
||||
m = QMenu(self)
|
||||
ac = m.addAction(_('Delete this rule'), partial(self.context_menu_handler, 'delete', item))
|
||||
|
Loading…
x
Reference in New Issue
Block a user