mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-22 03:56:18 +01:00
Fix #1900220 [Expand category in context menu of the Tag browser when the category is already expanded](https://bugs.launchpad.net/calibre/+bug/1900220)
This commit is contained in:
parent
bcac649b05
commit
b0b3effc40
1 changed files with 3 additions and 2 deletions
|
|
@ -851,11 +851,12 @@ def add_node_tree(tree_dict, m, path):
|
|||
|
||||
self.context_menu.addSeparator()
|
||||
if index.isValid() and self.model().rowCount(index) > 0:
|
||||
self.context_menu.addAction(_('Expand {0}').format(node_name),
|
||||
partial(self.expand_node_and_descendants, index))
|
||||
if self.isExpanded(index):
|
||||
self.context_menu.addAction(_("Collapse {0}").format(node_name),
|
||||
partial(self.collapse_node, index))
|
||||
else:
|
||||
self.context_menu.addAction(_('Expand {0}').format(node_name),
|
||||
partial(self.expand_node_and_descendants, index))
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue