mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04: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
@ -851,11 +851,12 @@ class TagsView(QTreeView): # {{{
|
||||
|
||||
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…
x
Reference in New Issue
Block a user