expand context list with VectorLayers (not only displayable)

This commit is contained in:
KatKatKateryna
2024-11-07 23:33:26 +00:00
parent 82fcfe6661
commit 46a7b968e1
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -474,7 +474,9 @@ class SpeckleProvider(BaseProvider):
and (isinstance(getattr(x, item, None), list) or ("grasshopper" in self.sourceApp.lower() and x.speckle_type == "Base") )
],
)
context_list = [x for x in GraphTraversal([rule]).traverse(commit_obj) if isDisplayable(x.current)]
# for the context list, save the displayable objects and Layers (for getting CRS for now)
context_list = [x for x in GraphTraversal([rule]).traverse(commit_obj) if isDisplayable(x.current) or x.current.speckle_type.endswith("VectorLayer")]
get_set_crs_settings(self, commit_obj, context_list, data)
+1 -1
View File
@@ -51,7 +51,7 @@ def get_set_crs_settings(self: "SpeckleProvider", commit_obj: "Base", context_li
root_objects = []
try:
root_objects = [commit_obj] + commit_obj.elements
root_objects = [commit_obj] + commit_obj.elements + [c.current for c in context_list]
except AttributeError as ex:
pass # old commit structure