mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Make manage categories focus on the category when sub-categories are right-clicked.
This commit is contained in:
parent
8b7b831d80
commit
b223290b14
@ -356,10 +356,11 @@ class TagsView(QTreeView): # {{{
|
||||
|
||||
# Always show the user categories editor
|
||||
self.context_menu.addSeparator()
|
||||
if category in self.db.prefs.get('user_categories', {}).keys():
|
||||
if key.startswith('@') and \
|
||||
key[1:] in self.db.prefs.get('user_categories', {}).keys():
|
||||
self.context_menu.addAction(_('Manage User Categories'),
|
||||
partial(self.context_menu_handler, action='manage_categories',
|
||||
category=category))
|
||||
category=key[1:]))
|
||||
else:
|
||||
self.context_menu.addAction(_('Manage User Categories'),
|
||||
partial(self.context_menu_handler, action='manage_categories',
|
||||
|
Loading…
x
Reference in New Issue
Block a user