mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Merge pull request #1349 from RumovZ/rename-with-parents
Disable 'Rename with Parents' for top-level items
This commit is contained in:
commit
ab20f215b1
1 changed files with 4 additions and 1 deletions
|
@ -906,7 +906,10 @@ class SidebarTreeView(QTreeView):
|
|||
) -> None:
|
||||
if item.item_type.is_editable() and len(self._selected_items()) == 1:
|
||||
menu.addAction(tr.actions_rename(), lambda: self.edit(index))
|
||||
if item.item_type in (SidebarItemType.TAG, SidebarItemType.DECK):
|
||||
if (
|
||||
item.item_type in (SidebarItemType.TAG, SidebarItemType.DECK)
|
||||
and item.name_prefix
|
||||
):
|
||||
menu.addAction(
|
||||
tr.actions_rename_with_parents(),
|
||||
lambda: self._on_rename_with_parents(item),
|
||||
|
|
Loading…
Reference in a new issue