From e4d6c328fcc110bc274a31ef750d36282b0f53cb Mon Sep 17 00:00:00 2001 From: Roy-043 Date: Tue, 31 Oct 2023 12:02:28 +0100 Subject: [PATCH] Draft: clone IfcType and Subvolume properties Fixes #11186. --- src/Mod/Draft/draftmake/make_clone.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/Mod/Draft/draftmake/make_clone.py b/src/Mod/Draft/draftmake/make_clone.py index d6158cd71e..4b6e338ef8 100644 --- a/src/Mod/Draft/draftmake/make_clone.py +++ b/src/Mod/Draft/draftmake/make_clone.py @@ -88,16 +88,13 @@ def make_clone(obj, delta=None, forcedraft=False): base = utils.get_clone_base(obj[0]) cl.Label = prefix + base.Label cl.CloneOf = base - if hasattr(cl,"Material") and hasattr(obj[0],"Material"): - cl.Material = obj[0].Material if utils.get_type(obj[0]) != "BuildingPart": cl.Placement = obj[0].Placement - try: - cl.Role = base.Role - cl.Description = base.Description - cl.Tag = base.Tag - except Exception: - pass + for prop in ("Description", "IfcType", "Material", "Subvolume", "Tag"): + try: + setattr(cl, prop, getattr(base, prop)) + except Exception: + pass if App.GuiUp: gui_utils.format_object(cl, base) # Workaround to trigger update of DiffuseColor: