mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
few enhancements
This commit is contained in:
parent
e6522e4d4e
commit
10ebfa6d8e
1 changed files with 5 additions and 11 deletions
|
|
@ -1046,10 +1046,9 @@ class InstanceListView(AbstractInstanceView):
|
||||||
children_ids, parent_active = _queue.popleft()
|
children_ids, parent_active = _queue.popleft()
|
||||||
for instance_id in children_ids:
|
for instance_id in children_ids:
|
||||||
widget = self._widgets_by_id[instance_id]
|
widget = self._widgets_by_id[instance_id]
|
||||||
# Add children ids to 'instance_ids' to traverse them too
|
# Parent active state changed -> traverse children too
|
||||||
add_children = False
|
add_children = False
|
||||||
if instance_id in instance_ids:
|
if instance_id in instance_ids:
|
||||||
# Parent active state changed -> traverse children too
|
|
||||||
add_children = (
|
add_children = (
|
||||||
parent_active is not widget.is_parent_active()
|
parent_active is not widget.is_parent_active()
|
||||||
)
|
)
|
||||||
|
|
@ -1069,16 +1068,11 @@ class InstanceListView(AbstractInstanceView):
|
||||||
add_children = True
|
add_children = True
|
||||||
|
|
||||||
if not add_children:
|
if not add_children:
|
||||||
|
if not instance_ids:
|
||||||
|
break
|
||||||
continue
|
continue
|
||||||
|
|
||||||
_children = {
|
_children = set(self._instance_ids_by_parent_id[instance_id])
|
||||||
child_id
|
|
||||||
for child_id in (
|
|
||||||
self._instance_ids_by_parent_id[instance_id]
|
|
||||||
)
|
|
||||||
if child_id not in discarted_ids
|
|
||||||
}
|
|
||||||
|
|
||||||
if _children:
|
if _children:
|
||||||
instance_ids |= _children
|
instance_ids |= _children
|
||||||
_queue.append((_children, widget.is_active()))
|
_queue.append((_children, widget.is_active()))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue