mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
dont remove tasks if it's parent was not removed and task is not selected
This commit is contained in:
parent
8b30c7a5ed
commit
54e7a479c3
1 changed files with 5 additions and 1 deletions
|
|
@ -449,8 +449,12 @@ class HierarchyModel(QtCore.QAbstractItemModel):
|
|||
_all_descendants[parent_item.id][cur_item.id] = cur_item
|
||||
|
||||
if isinstance(cur_item, TaskItem):
|
||||
was_removed = cur_item.data(None, REMOVED_ROLE)
|
||||
task_removed = True
|
||||
cur_item.setData(None, task_removed, REMOVED_ROLE)
|
||||
if not was_removed and parent_item is not None:
|
||||
task_removed = parent_item.data(None, REMOVED_ROLE)
|
||||
if not was_removed:
|
||||
cur_item.setData(None, task_removed, REMOVED_ROLE)
|
||||
return task_removed
|
||||
|
||||
remove_item = cur_item.data(None, HIERARCHY_CHANGE_ABLE_ROLE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue