mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Remove doubled "Collapse [category]" in the tag browser context menu when right-clicking on a top-level item.
This commit is contained in:
parent
3b096ca3ff
commit
abca643c3f
@ -856,7 +856,7 @@ class TagsView(QTreeView): # {{{
|
||||
if self.isExpanded(index):
|
||||
self.context_menu.addAction(_("Collapse {0}").format(node_name),
|
||||
partial(self.collapse_node, index))
|
||||
if parent_index is not None:
|
||||
if parent_index is not None and parent_index != index:
|
||||
if self.isExpanded(parent_index):
|
||||
# Don't bother to collapse if it isn't expanded
|
||||
self.context_menu.addAction(_("Collapse {0}").format(parent_name),
|
||||
|
Loading…
x
Reference in New Issue
Block a user