Assembly: Insert Component: Fix 'Joint Group' being listed even though it's empty. It's because we were using OutList instead of claimChildren.
This commit is contained in:
@@ -180,7 +180,7 @@ class TaskAssemblyInsertLink(QtCore.QObject):
|
||||
(not onlyParts and child.isDerivedFrom("Part::Feature"))
|
||||
or child.isDerivedFrom("App::Part")
|
||||
)
|
||||
for child in obj.OutListRecursive
|
||||
for child in obj.ViewObject.claimChildrenRecursive()
|
||||
):
|
||||
continue # Skip this object if no relevant children
|
||||
|
||||
@@ -201,7 +201,7 @@ class TaskAssemblyInsertLink(QtCore.QObject):
|
||||
if obj.isDerivedFrom("App::Part") or obj.isDerivedFrom(
|
||||
"App::DocumentObjectGroup"
|
||||
):
|
||||
process_objects(obj.OutList, objItem)
|
||||
process_objects(obj.ViewObject.claimChildren(), objItem)
|
||||
|
||||
guiDoc = Gui.getDocument(doc.Name)
|
||||
process_objects(guiDoc.TreeRootObjects, docItem)
|
||||
|
||||
Reference in New Issue
Block a user