mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
In the tag browser, ensure that "Change category icon" appears only on top-level nodes. This avoids confusion about what which items are affected in hierarchical categories.
This commit is contained in:
parent
7df3515b10
commit
8c56e6c291
@ -650,11 +650,12 @@ class TagsView(QTreeView): # {{{
|
||||
partial(self.context_menu_handler, action='manage_searches',
|
||||
category=tag.name if tag else None))
|
||||
|
||||
self.context_menu.addSeparator()
|
||||
self.context_menu.addAction(_('Change category icon'),
|
||||
partial(self.context_menu_handler, action='set_icon', key=key))
|
||||
self.context_menu.addAction(_('Restore default icon'),
|
||||
partial(self.context_menu_handler, action='clear_icon', key=key))
|
||||
if tag is None:
|
||||
self.context_menu.addSeparator()
|
||||
self.context_menu.addAction(_('Change category icon'),
|
||||
partial(self.context_menu_handler, action='set_icon', key=key))
|
||||
self.context_menu.addAction(_('Restore default icon'),
|
||||
partial(self.context_menu_handler, action='clear_icon', key=key))
|
||||
|
||||
# Always show the User categories editor
|
||||
self.context_menu.addSeparator()
|
||||
|
Loading…
x
Reference in New Issue
Block a user