Assembly: Prevent insertion of parent objects that cause dependency loop and crash.

This commit is contained in:
PaddleStroke
2024-07-08 12:35:55 +02:00
committed by Chris Hennes
parent 59f815234a
commit bfd871cc6c

View File

@@ -168,6 +168,10 @@ class TaskAssemblyInsertLink(QtCore.QObject):
if obj == self.assembly:
continue # Skip current assembly
if obj in self.assembly.InListRecursive:
continue # Prevent dependency loop.
# For instance if asm1/asm2 with asm2 active, we don't want to have asm1 in the list
if (
obj.isDerivedFrom("Part::Feature")
or obj.isDerivedFrom("App::Part")