From bfd871cc6c89edb7ff4dec09a42739b520c16d1e Mon Sep 17 00:00:00 2001 From: PaddleStroke Date: Mon, 8 Jul 2024 12:35:55 +0200 Subject: [PATCH] Assembly: Prevent insertion of parent objects that cause dependency loop and crash. --- src/Mod/Assembly/CommandInsertLink.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Mod/Assembly/CommandInsertLink.py b/src/Mod/Assembly/CommandInsertLink.py index aa343a262b..ea889c4271 100644 --- a/src/Mod/Assembly/CommandInsertLink.py +++ b/src/Mod/Assembly/CommandInsertLink.py @@ -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")