Merge pull request #19287 from Roy-043/Draft-remove-faulty-code-from-importDXF.py

Draft: remove faulty code from importDXF.py
This commit is contained in:
Roy-043
2025-01-28 16:53:39 +01:00
committed by GitHub

View File

@@ -1928,16 +1928,7 @@ def addObject(shape, name="Shape", layer=None):
newob = shape
if layer:
lay = locateLayer(layer)
# For old style layers, which are just groups
if hasattr(lay, "Group"):
pass
# For new Draft Layers
elif hasattr(lay, "Proxy") and hasattr(lay.Proxy, "Group"):
lay = lay.Proxy
else:
lay = None
if lay != None:
if lay not in layerObjects:
l = []
layerObjects[lay] = l
@@ -1945,8 +1936,6 @@ def addObject(shape, name="Shape", layer=None):
l = layerObjects[lay]
l.append(newob)
formatObject(newob)
return newob