Merge pull request #14388 from Ondsel-Development/core_rootObjects

Core: Add Gui::Document::getTreeRootObjects() Fixes #14373
This commit is contained in:
Chris Hennes
2024-06-17 11:04:18 -05:00
committed by GitHub
10 changed files with 122 additions and 4 deletions

View File

@@ -203,7 +203,8 @@ class TaskAssemblyInsertLink(QtCore.QObject):
):
process_objects(obj.OutList, objItem)
process_objects(doc.RootObjectsIgnoreLinks, docItem)
guiDoc = Gui.getDocument(doc.Name)
process_objects(guiDoc.TreeRootObjects, docItem)
self.form.partList.expandAll()
def onFilterChange(self):

View File

@@ -308,7 +308,7 @@ def getGlobalPlacement(targetObj, container=None):
def isThereOneRootAssembly():
for part in App.activeDocument().RootObjectsIgnoreLinks:
for part in Gui.activeDocument().TreeRootObjects:
if part.TypeId == "Assembly::AssemblyObject":
return True
return False