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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user