mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
fix selected items
This commit is contained in:
parent
1b1c6145df
commit
30b8908d6b
1 changed files with 8 additions and 3 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import sys
|
||||
import collections
|
||||
|
||||
from Qt import QtWidgets, QtCore
|
||||
from avalon import api, io, pipeline
|
||||
|
|
@ -378,15 +379,19 @@ class LoaderWindow(QtWidgets.QDialog):
|
|||
|
||||
version_docs = []
|
||||
if rows:
|
||||
items = collections.deque()
|
||||
for index in rows:
|
||||
if not index or not index.isValid():
|
||||
continue
|
||||
item = index.data(subsets.model.ItemRole)
|
||||
if item is None:
|
||||
continue
|
||||
if item is not None:
|
||||
items.append(item)
|
||||
|
||||
while items:
|
||||
item = items.popleft()
|
||||
if item.get("isGroup") or item.get("isMerged"):
|
||||
for child in item.children():
|
||||
version_docs.append(child["version_document"])
|
||||
items.append(child)
|
||||
else:
|
||||
version_docs.append(item["version_document"])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue