diff options
| -rwxr-xr-x | share/extensions/dxf_input.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/share/extensions/dxf_input.py b/share/extensions/dxf_input.py index 30adb73f9..caeee6679 100755 --- a/share/extensions/dxf_input.py +++ b/share/extensions/dxf_input.py @@ -482,6 +482,9 @@ while line[0] and (line[1] != 'ENDSEC' or not inENTITIES): elif vals[groups['8']]: # use Common Layer Name if not vals[groups['8']][0]: vals[groups['8']][0] = '0' # use default name + if not layer_nodes.has_key(vals[groups['8']][0]): + attribs = {inkex.addNS('groupmode','inkscape'): 'layer', inkex.addNS('label','inkscape'): '%s' % vals[groups['8']][0]} + layer_nodes[vals[groups['8']][0]] = inkex.etree.SubElement(doc.getroot(), 'g', attribs) layer = layer_nodes[vals[groups['8']][0]] color = '#000000' # default color if vals[groups['8']]: |
