ui: ignore Ctrl+Delete shortcut if root is selected

This commit is contained in:
Vinícius 2020-11-16 19:16:00 -03:00 committed by Peter F. Patel-Schneider
parent daafe5ebca
commit 52109ade91
1 changed files with 1 additions and 1 deletions

View File

@ -313,7 +313,7 @@ class DiversionDialog:
parent_it = m.iter_parent(it)
parent_c = m[parent_it][0].component if wrapped.level > 0 else None
can_wrap = wrapped.editable and wrapped.component is not None and wrapped.level >= 2
can_delete = wrapped.editable and not isinstance(parent_c, _DIV.Not) and wrapped.component is not None
can_delete = wrapped.editable and not isinstance(parent_c, _DIV.Not) and c is not None and wrapped.level >= 1
can_insert = wrapped.editable and not isinstance(parent_c, _DIV.Not) and wrapped.level >= 2
can_insert_only_rule = wrapped.editable and wrapped.level == 1
can_flatten = wrapped.editable and not isinstance(parent_c, _DIV.Not) and isinstance(