Core: Add Gui::Document::getTreeRootObjects()
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user