mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 08:54:53 +01:00
not possible to move with deleted or not hierachy changeable items
This commit is contained in:
parent
d01cd88a1b
commit
0c779b7ed2
1 changed files with 18 additions and 0 deletions
|
|
@ -659,6 +659,15 @@ class HierarchyModel(QtCore.QAbstractItemModel):
|
|||
if isinstance(item, (RootItem, ProjectItem)):
|
||||
return
|
||||
|
||||
if item.data(REMOVED_ROLE):
|
||||
return
|
||||
|
||||
if (
|
||||
isinstance(item, AssetItem)
|
||||
and not item.data(HIERARCHY_CHANGE_ABLE_ROLE)
|
||||
):
|
||||
return
|
||||
|
||||
if abs(direction) != 1:
|
||||
return
|
||||
|
||||
|
|
@ -813,6 +822,15 @@ class HierarchyModel(QtCore.QAbstractItemModel):
|
|||
if isinstance(item, (RootItem, ProjectItem)):
|
||||
return
|
||||
|
||||
if item.data(REMOVED_ROLE):
|
||||
return
|
||||
|
||||
if (
|
||||
isinstance(item, AssetItem)
|
||||
and not item.data(HIERARCHY_CHANGE_ABLE_ROLE)
|
||||
):
|
||||
return
|
||||
|
||||
if abs(direction) != 1:
|
||||
return
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue