mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 08:22:24 -04:00
Fix children check in context tree actions
This commit is contained in:
parent
513e7bdfb4
commit
39dad049cd
1 changed files with 2 additions and 2 deletions
|
@ -1103,9 +1103,9 @@ class SidebarTreeView(QTreeView):
|
|||
return
|
||||
|
||||
menu.addSeparator()
|
||||
if any(not item.expanded for item in selected_items):
|
||||
if any(not item.expanded for item in selected_items if item.children):
|
||||
menu.addAction(tr(TR.BROWSING_SIDEBAR_EXPAND), lambda: set_expanded(True))
|
||||
if any(item.expanded for item in selected_items):
|
||||
if any(item.expanded for item in selected_items if item.children):
|
||||
menu.addAction(
|
||||
tr(TR.BROWSING_SIDEBAR_COLLAPSE), lambda: set_expanded(False)
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue