mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
TB Icons: Fix showing the "Use default" menu line when there is no item value.
This commit is contained in:
parent
06186cd93d
commit
2b5f4eeda0
@ -1282,10 +1282,10 @@ class TagsView(QTreeView): # {{{
|
|||||||
partial(self.context_menu_handler, action='set_icon',
|
partial(self.context_menu_handler, action='set_icon',
|
||||||
key=key, index=index, category=category, extra=(icon_name, True)))
|
key=key, index=index, category=category, extra=(icon_name, True)))
|
||||||
ma.setEnabled(icon_name is not None and not for_child)
|
ma.setEnabled(icon_name is not None and not for_child)
|
||||||
im.addAction(_('Use the default icon for {}').format(for_name),
|
ma = im.addAction(_('Use the default icon for {}').format(for_name),
|
||||||
partial(self.context_menu_handler, action='clear_icon',
|
partial(self.context_menu_handler, action='clear_icon',
|
||||||
key=key, index=index, category=category))
|
key=key, index=index, category=category))
|
||||||
ma.setEnabled(icon_name is not None)
|
ma.setEnabled(name is not None and icon_name is not None)
|
||||||
im.addSection(_('Defaults'))
|
im.addSection(_('Defaults'))
|
||||||
im.addAction(_('Use/edit a template to choose the default value icon'),
|
im.addAction(_('Use/edit a template to choose the default value icon'),
|
||||||
partial(self.context_menu_handler, action='set_icon',
|
partial(self.context_menu_handler, action='set_icon',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user